summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest/src
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-04-15 16:18:08 -0700
committerChris Craik <ccraik@google.com>2014-04-23 16:15:11 -0700
commit3f085429fd47ebd32ac2463b3eae2a5a6c17be25 (patch)
tree2930b7ee50ce98092fde97546a3d546c817038f1 /tests/HwAccelerationTest/src
parentfbb54b8363b66e0b22d519ee20d1a50e8b5340ee (diff)
downloadframeworks_base-3f085429fd47ebd32ac2463b3eae2a5a6c17be25.zip
frameworks_base-3f085429fd47ebd32ac2463b3eae2a5a6c17be25.tar.gz
frameworks_base-3f085429fd47ebd32ac2463b3eae2a5a6c17be25.tar.bz2
Clip TouchFeedbackDrawable effect to receiver Outline
Projected RenderNodes are now wrapped with a ClipRect or masked SaveLayer, so that they are clipped to the outline of the projection receiver surface. Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
Diffstat (limited to 'tests/HwAccelerationTest/src')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java
new file mode 100644
index 0000000..2ae960b
--- /dev/null
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java
@@ -0,0 +1,27 @@
+package com.android.test.hwui;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import android.os.Bundle;
+import android.util.AttributeSet;
+import android.view.RenderNode;
+import android.view.View;
+
+public class ProjectionClippingActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.projection_clipping);
+ View.OnClickListener listener = new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // woo! nothing!
+ }
+ };
+ findViewById(R.id.clickable1).setOnClickListener(listener);
+ findViewById(R.id.clickable2).setOnClickListener(listener);
+ }
+}