summaryrefslogtreecommitdiffstats
path: root/tests/RenderScriptTests
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-01-09 18:13:58 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-01-09 18:15:15 -0800
commit8d1127ef3f5889c1d3fa88a80dfd052b0bf1a2de (patch)
tree2843c38af7fb720c80e8e9c95f952b2e1f09d723 /tests/RenderScriptTests
parent978ad10cabd33b877d15e0e158b377abb6db3b1e (diff)
parentf9485d0313bd1950ff329eca63751cb58cddb0b9 (diff)
downloadframeworks_base-8d1127ef3f5889c1d3fa88a80dfd052b0bf1a2de.zip
frameworks_base-8d1127ef3f5889c1d3fa88a80dfd052b0bf1a2de.tar.gz
frameworks_base-8d1127ef3f5889c1d3fa88a80dfd052b0bf1a2de.tar.bz2
Merge "Update IP2 to use bitmap-backed allocations."
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());
}