diff options
author | Tim Murray <timmurray@google.com> | 2013-01-09 16:33:57 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2013-01-09 16:33:57 -0800 |
commit | f9485d0313bd1950ff329eca63751cb58cddb0b9 (patch) | |
tree | 097a1d3dc0b0104f6921ada6e703d9983e1b64e3 /tests/RenderScriptTests | |
parent | 4c7f809dd5c934b86b0450e59941998aeb7fb96e (diff) | |
download | frameworks_base-f9485d0313bd1950ff329eca63751cb58cddb0b9.zip frameworks_base-f9485d0313bd1950ff329eca63751cb58cddb0b9.tar.gz frameworks_base-f9485d0313bd1950ff329eca63751cb58cddb0b9.tar.bz2 |
Update IP2 to use bitmap-backed allocations.
Change-Id: I2967fff71db40b4a8a00cd0152bcc04c43b87f80
Diffstat (limited to 'tests/RenderScriptTests')
-rw-r--r-- | tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/ImageProcessingActivity2.java | 2 | ||||
-rw-r--r-- | tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/ImageProcessingActivity2.java b/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/ImageProcessingActivity2.java index 227518f..19bea43 100644 --- a/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/ImageProcessingActivity2.java +++ b/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/ImageProcessingActivity2.java @@ -229,7 +229,7 @@ public class ImageProcessingActivity2 extends Activity break; } - mTest.createBaseTest(this, mBitmapIn, mBitmapIn2); + mTest.createBaseTest(this, mBitmapIn, mBitmapIn2, mBitmapOut); setupBars(); mTest.runTest(); diff --git a/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java b/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java index 9df2eff..dbbc594 100644 --- a/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java +++ b/tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java @@ -88,18 +88,14 @@ public class TestBase { return false; } - public final void createBaseTest(ImageProcessingActivity2 ipact, Bitmap b, Bitmap b2) { + public final void createBaseTest(ImageProcessingActivity2 ipact, Bitmap b, Bitmap b2, Bitmap outb) { act = ipact; mRS = RenderScript.create(act); - mInPixelsAllocation = Allocation.createFromBitmap(mRS, b, - Allocation.MipmapControl.MIPMAP_NONE, - Allocation.USAGE_SCRIPT); - mInPixelsAllocation2 = Allocation.createFromBitmap(mRS, b2, - Allocation.MipmapControl.MIPMAP_NONE, - Allocation.USAGE_SCRIPT); - mOutPixelsAllocation = Allocation.createFromBitmap(mRS, b, - Allocation.MipmapControl.MIPMAP_NONE, - Allocation.USAGE_SCRIPT); + + mInPixelsAllocation = Allocation.createFromBitmap(mRS, b); + mInPixelsAllocation2 = Allocation.createFromBitmap(mRS, b2); + mOutPixelsAllocation = Allocation.createFromBitmap(mRS, outb); + createTest(act.getResources()); } |