summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest/src/com/android
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-10-20 20:31:50 -0700
committerRomain Guy <romainguy@google.com>2011-10-20 20:33:07 -0700
commit5e7c469c7a3039af7696789a797f8d91a45227eb (patch)
treef66d7d042190f6ec0418dd04db3853d803fcb2d5 /tests/HwAccelerationTest/src/com/android
parenta62f172215727a1e00af0cb934904e00926a86c9 (diff)
downloadframeworks_base-5e7c469c7a3039af7696789a797f8d91a45227eb.zip
frameworks_base-5e7c469c7a3039af7696789a797f8d91a45227eb.tar.gz
frameworks_base-5e7c469c7a3039af7696789a797f8d91a45227eb.tar.bz2
Make sure 9patches are not filtered when not necessary
Bug #5383406 Change-Id: I061c8069a4d9f4eaf45671283710b564639eeb32
Diffstat (limited to 'tests/HwAccelerationTest/src/com/android')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
index cfad6da..656f2b1 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
@@ -44,7 +44,7 @@ public class ThinPatchesActivity extends Activity {
}
private class PatchView extends View {
- private Drawable mPatch1, mPatch2;
+ private Drawable mPatch1, mPatch2, mPatch3;
private Bitmap mTexture;
public PatchView(Activity activity) {
@@ -53,6 +53,7 @@ public class ThinPatchesActivity extends Activity {
final Resources resources = activity.getResources();
mPatch1 = resources.getDrawable(R.drawable.patch);
mPatch2 = resources.getDrawable(R.drawable.btn_toggle_on);
+ mPatch3 = resources.getDrawable(R.drawable.patch2);
mTexture = Bitmap.createBitmap(4, 3, Bitmap.Config.ARGB_8888);
mTexture.setPixel(0, 0, 0xffff0000);
@@ -77,6 +78,14 @@ public class ThinPatchesActivity extends Activity {
final int left = (getWidth() - width) / 2;
final int top = (getHeight() - height) / 2;
+ canvas.save();
+ canvas.translate(0.0f, -height * 2 - 20.0f);
+
+ mPatch3.setBounds(left, top, left + height, top + width);
+ mPatch3.draw(canvas);
+
+ canvas.restore();
+
mPatch1.setBounds(left, top, left + width, top + height);
mPatch1.draw(canvas);