summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-08-01 15:29:25 -0700
committerRomain Guy <romainguy@google.com>2013-08-01 15:35:24 -0700
commitb7b93e00893f5c690a96bd3e0e10583bc5721f83 (patch)
tree89c975e81ab527630ab4c10478b80bca12593d24 /tests
parent5d3dff1d66f99fbd5bef9178e62d789119c02ad1 (diff)
downloadframeworks_base-b7b93e00893f5c690a96bd3e0e10583bc5721f83.zip
frameworks_base-b7b93e00893f5c690a96bd3e0e10583bc5721f83.tar.gz
frameworks_base-b7b93e00893f5c690a96bd3e0e10583bc5721f83.tar.bz2
Fix region clipping bugs
See external bug #58344 Change-Id: Iecd6c41fc8076cd76add2335d3442a6dd8878f12
Diffstat (limited to 'tests')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
index 066e35c..fe4d602 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
@@ -48,7 +48,7 @@ public class ClipRegion2Activity extends Activity {
}
public static class RegionView extends FrameLayout {
- private final Region mRegion = new Region();
+ private Region mRegion = new Region();
private float mClipPosition = 0.0f;
public RegionView(Context c) {
@@ -69,9 +69,7 @@ public class ClipRegion2Activity extends Activity {
canvas.save();
- mRegion.setEmpty();
- mRegion.op(0, 0, getWidth(), getHeight(),
- Region.Op.REPLACE);
+ mRegion.set(0, 0, getWidth(), getHeight());
mRegion.op(getWidth() / 4, getHeight() / 4, 3 * getWidth() / 4, 3 * getHeight() / 4,
Region.Op.DIFFERENCE);