summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-04-08 14:51:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-04-08 14:51:08 -0700
commit0343a7eb6d7cd2bd44dabe5119e2366e84427c93 (patch)
treea8b12e2b734d446aee78e8fd1c4de68249e79bcb /tests
parent5008e92d1fd573d926cd55c39ca723a6fbdf7c4b (diff)
parentfcf2be1846935e7983ea2fe87fdd4d7af27764b6 (diff)
downloadframeworks_base-0343a7eb6d7cd2bd44dabe5119e2366e84427c93.zip
frameworks_base-0343a7eb6d7cd2bd44dabe5119e2366e84427c93.tar.gz
frameworks_base-0343a7eb6d7cd2bd44dabe5119e2366e84427c93.tar.bz2
Merge "TextLayoutCache - add glyphs caching"
Diffstat (limited to 'tests')
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestView.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
index cd415c2..f00bd06 100644
--- a/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
@@ -150,11 +150,13 @@ public class BiDiTestView extends View {
drawMetricsAroundText(canvas, x, y, textWidthHB, textWidthICU, textSize, Color.RED, Color.GREEN);
paint.setColor(Color.WHITE);
- char[] glyphs = new char[2*length];
- int count = getGlyphs(text, glyphs, dir);
-
+// char[] glyphs = new char[2*length];
+// int count = getGlyphs(text, glyphs, dir);
+//
// logGlypths(glyphs, count);
- drawTextWithDrawGlyph(canvas, glyphs, count, x, y + currentTextSize);
+// drawTextWithDrawGlyph(canvas, glyphs, count, x, y + currentTextSize);
+
+ drawTextWithGlyphs(canvas, text, x, y + currentTextSize, dir);
// Restore old paint properties
paint.setFakeBoldText(oldFakeBold);
@@ -167,6 +169,11 @@ public class BiDiTestView extends View {
canvas.drawGlyphs(glyphs, 0, count, x, y, paint);
}
+ private void drawTextWithGlyphs(Canvas canvas, String text, int x, int y, int dir) {
+ paint.setBidiFlags(dir);
+ canvas.drawTextWithGlyphs(text, x, y, paint);
+ }
+
private void logGlypths(char[] glyphs, int count) {
Log.v(TAG, "GlyphIds - count=" + count);
for (int n = 0; n < count; n++) {