From d26297fa562d8bb203df1bb5e6ded7f62c56cdb7 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Mon, 1 Nov 2010 16:08:59 -0700 Subject: Fix race condition in resize that was created when GetType for allocation and Types became async. Change-Id: Ie7036f9481cececf9565d30b25be82480f176ff2 --- graphics/java/android/renderscript/Allocation.java | 1 + 1 file changed, 1 insertion(+) (limited to 'graphics') diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index f8ad5cc..dfd6ac8 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); -- cgit v1.1