summaryrefslogtreecommitdiffstats
path: root/tests/RenderScriptTests
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-01-09 16:33:57 -0800
committerTim Murray <timmurray@google.com>2013-01-09 16:33:57 -0800
commitf9485d0313bd1950ff329eca63751cb58cddb0b9 (patch)
tree097a1d3dc0b0104f6921ada6e703d9983e1b64e3 /tests/RenderScriptTests
parent4c7f809dd5c934b86b0450e59941998aeb7fb96e (diff)
downloadframeworks_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.java2
-rw-r--r--tests/RenderScriptTests/ImageProcessing2/src/com/android/rs/image/TestBase.java16
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());
}