summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2010-11-01 16:13:55 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-11-01 16:13:55 -0700
commit7d5411fd3f08326d88142bc8f83ad41405893471 (patch)
tree7c6af5a042eaf876a60ee1cc7aa42be0deb6471d
parent30ce36ec701cbdd961fc6fc18c07cb1a48b46a46 (diff)
parentd26297fa562d8bb203df1bb5e6ded7f62c56cdb7 (diff)
Merge "Fix race condition in resize that was created when GetType for allocation and Types became async."
-rw-r--r--graphics/java/android/renderscript/Allocation.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index f8ad5cc17537..dfd6ac8a6605 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -199,6 +199,7 @@ public class Allocation extends BaseObj {
throw new IllegalStateException("Resize only support for 1D allocations at this time.");
}
mRS.nAllocationResize1D(mID, dimX);
+ mRS.finish(); // Necessary because resize is fifoed and update is async.
int typeID = mRS.nAllocationGetType(mID);
mType = new Type(typeID, mRS);