summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-05-14 19:44:40 -0700
committerRomain Guy <romainguy@google.com>2012-05-14 19:44:40 -0700
commite651cc6239616a202f6e96ebc2ed93b4b8b3627c (patch)
tree7aa90f8cccc91555bd652d0a88a898a026cdc333 /tests/HwAccelerationTest
parent99a6ddd4cd8762654a575eb4ac3d0e5431d919b8 (diff)
downloadframeworks_base-e651cc6239616a202f6e96ebc2ed93b4b8b3627c.zip
frameworks_base-e651cc6239616a202f6e96ebc2ed93b4b8b3627c.tar.gz
frameworks_base-e651cc6239616a202f6e96ebc2ed93b4b8b3627c.tar.bz2
Remove all Dalvik allocations from Cavnas.drawBitmap(int[], ...)
Change-Id: Ie28538a2104d21154fdc78a56525e7403f08287d
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
index db9017c..0d825d7 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
@@ -87,7 +87,7 @@ public class BitmapMutateActivity extends Activity {
int width = mBitmap1.getWidth();
int height = mBitmap1.getHeight();
- canvas.translate((getWidth() - width) / 2, (getHeight() - height) / 2);
+ canvas.translate((getWidth() - width) / 2, 0);
for (int x = 0; x < width; x++) {
int color = 0xff000000;
@@ -101,6 +101,11 @@ public class BitmapMutateActivity extends Activity {
mBitmap1.setPixels(mPixels, 0, width, 0, 0, width, height);
canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mBitmapPaint);
+
+ canvas.save();
+ canvas.translate(0.0f, height + 32);
+ canvas.drawBitmap(mPixels, 0, width, 0.0f, 0.0f, width, height, false, mBitmapPaint);
+ canvas.restore();
}
}
}