summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-09-19 17:25:38 -0700
committerRomain Guy <romainguy@google.com>2012-09-19 21:10:09 -0700
commit2b7028eabac80cec170572bc0e945a1d4224e595 (patch)
tree116f24c751ece653a5c1e08aa9c142ad1e142b25 /tests/HwAccelerationTest
parent4be07ade3658da9345067780520ddbd266900ee4 (diff)
downloadframeworks_base-2b7028eabac80cec170572bc0e945a1d4224e595.zip
frameworks_base-2b7028eabac80cec170572bc0e945a1d4224e595.tar.gz
frameworks_base-2b7028eabac80cec170572bc0e945a1d4224e595.tar.bz2
Add support for QCOM_tiled_rendering
Bug #7186819 This optional OpenGL extension can be used by tiled renderers to optimize copies from main memory to tiles memory. Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r--tests/HwAccelerationTest/res/layout/text_fade.xml1
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java5
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java3
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/res/layout/text_fade.xml b/tests/HwAccelerationTest/res/layout/text_fade.xml
index 8da2204..08a70b3 100644
--- a/tests/HwAccelerationTest/res/layout/text_fade.xml
+++ b/tests/HwAccelerationTest/res/layout/text_fade.xml
@@ -32,6 +32,7 @@
android:ellipsize="marquee"
android:fadingEdgeLength="16sp"
android:fadingEdge="horizontal"
+ android:requiresFadingEdge="horizontal"
android:text="This is a really really really really really really long string"
android:textSize="16sp" />
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
index c8bbc7d..d307ef8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
@@ -21,7 +21,9 @@ import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Bundle;
+import android.text.TextUtils;
import android.view.View;
+import android.widget.TextView;
@SuppressWarnings({"UnusedDeclaration"})
public class TextFadeActivity extends Activity {
@@ -30,5 +32,8 @@ public class TextFadeActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.text_fade);
+
+ findViewById(R.id.contact_tile_name).setHorizontalFadingEdgeEnabled(true);
+ ((TextView) findViewById(R.id.contact_tile_name)).setEllipsize(TextUtils.TruncateAt.MARQUEE);
}
}
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
index 359447d..0ddd7fd 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
@@ -81,11 +81,14 @@ public class ViewLayersActivity extends Activity {
leftList.setAlpha(0.5f);
middleList.setLayerType(View.LAYER_TYPE_HARDWARE, p3);
middleList.setAlpha(0.5f);
+ middleList.setVerticalFadingEdgeEnabled(true);
rightList.setLayerType(View.LAYER_TYPE_SOFTWARE, p2);
moveRight.start();
moveLeft.start();
rotate.start();
+
+ ((View) leftList.getParent()).setAlpha(0.5f);
}
}, 2000);
}