diff options
author | Jason Sams <rjsams@android.com> | 2010-11-01 16:08:59 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-11-01 16:08:59 -0700 |
commit | d26297fa562d8bb203df1bb5e6ded7f62c56cdb7 (patch) | |
tree | 543599c92edeba78a9c1148fb7f19d7f87c061d8 /graphics/java/android/renderscript/Allocation.java | |
parent | 8f0adba7cbac2391719896947601e403b5895fdc (diff) |
Fix race condition in resize that was created when
GetType for allocation and Types became async.
Change-Id: Ie7036f9481cececf9565d30b25be82480f176ff2
Diffstat (limited to 'graphics/java/android/renderscript/Allocation.java')
-rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 1 |
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); |