I am trying to copy from one allocation into another one:

public void test(Allocation inputAllocation, Shape shape) {
     inputAllocation.syncAll(Allocation.USAGE_SCRIPT);
     mRS.finish();

     Allocation inputInitialAllocation = Allocation.createTyped(mRS, 
inputAllocation.getType(), Allocation.MipmapControl.MIPMAP_NONE, 
Allocation.USAGE_GRAPHICS_TEXTURE | Allocation.USAGE_SCRIPT);

     inputInitialAllocation.copyFrom(inputAllocation);

     inputAllocation.syncAll(Allocation.USAGE_SCRIPT);
     inputInitialAllocation.syncAll(Allocation.USAGE_SCRIPT);
     mRS.finish();
     //doing job with inputInitialAllocation and inputAllocation
}


The result differs depends on how I am copying the allocations. When I am 
doing manual copy (convert allocation to array and then create new one) it 
works perfectly, but when I am using 
inputInitialAllocation.copyFrom(inputAllocation); the result is different. 
What can cause to such a weird behavior? By using copyFrom() I am getting a 
blurred image, whereas with the manual copy I am getting the normal image.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c496d1b7-a117-44a5-9288-f6951a702ea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to