summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-10-16 11:08:44 -0700
committerRomain Guy <romainguy@google.com>2012-10-16 11:09:26 -0700
commita92bb4dc9605c86b8773c929412af2dc242b1fa8 (patch)
treebf77badb865a50d59f6d9ecf40426ab6e0a72bbb /tests
parent4682cf02b42f75876f14f512e874c3e798b09c9c (diff)
downloadframeworks_base-a92bb4dc9605c86b8773c929412af2dc242b1fa8.zip
frameworks_base-a92bb4dc9605c86b8773c929412af2dc242b1fa8.tar.gz
frameworks_base-a92bb4dc9605c86b8773c929412af2dc242b1fa8.tar.bz2
Support clipping in Canvas.drawBitmapMesh()
Bug #7354162 Change-Id: Ifd1d0b365e8a4d88e0ff0629c9ee13f27e1a7331
Diffstat (limited to 'tests')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
index 8cc2246..854dd69 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
@@ -68,9 +68,16 @@ public class BitmapMeshActivity extends Activity {
super.onDraw(canvas);
canvas.drawARGB(255, 255, 255, 255);
+
canvas.translate(100, 100);
canvas.drawBitmapMesh(mBitmap1, 3, 3, mVertices, 0, null, 0, null);
+ canvas.save();
+ canvas.translate(0, 400);
+ canvas.clipRect(0.0f, 0.0f, 80.0f, 80.0f);
+ canvas.drawBitmapMesh(mBitmap1, 3, 3, mVertices, 0, null, 0, null);
+ canvas.restore();
+
canvas.translate(400, 0);
canvas.drawBitmapMesh(mBitmap1, 3, 3, mVertices, 0, mColors, 0, null);
}