summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-10 22:26:16 -0800
committerRomain Guy <romainguy@google.com>2011-01-10 22:26:16 -0800
commit7230a74e9a36dfc6c4346c14e325bf07cd05b380 (patch)
tree0726a708eb545618fde761bd03ed3a1830e34c03 /tests/HwAccelerationTest
parenta07105b7d2a27e6d69407bf96ddb773bddb5e553 (diff)
downloadframeworks_base-7230a74e9a36dfc6c4346c14e325bf07cd05b380.zip
frameworks_base-7230a74e9a36dfc6c4346c14e325bf07cd05b380.tar.gz
frameworks_base-7230a74e9a36dfc6c4346c14e325bf07cd05b380.tar.bz2
Composite layers as regions.
This change detects what area of a layer was drawn into and generates a mesh to match this area exactly. This can be used to avoid blending empty pixels when the layer is composited. This change also adds proper layers support to lines rendering and implements layers composition in a more readable way. Change-Id: I4a5588b98b19bd66891ebdc39631b193c5e31999
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
index 91e3b84..8ca842e 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
@@ -23,6 +23,7 @@ import android.graphics.BitmapFactory;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
+import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
@@ -31,7 +32,9 @@ public class LinesActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ getWindow().setBackgroundDrawable(new ColorDrawable(0xffffffff));
final LinesView view = new LinesView(this);
+ //view.setAlpha(0.80f);
setContentView(view);
}
@@ -91,8 +94,6 @@ public class LinesActivity extends Activity {
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- canvas.drawARGB(255, 255, 255, 255);
-
canvas.save();
canvas.translate(100.0f, 20.0f);