diff options
| author | Raph Levien <raph@google.com> | 2015-03-04 10:41:30 -0800 |
|---|---|---|
| committer | Raph Levien <raph@google.com> | 2015-03-13 10:11:57 -0700 |
| commit | 70616ecd22fafccf2fab7565ccfbb3b5f91c5580 (patch) | |
| tree | a564de1bc1b4dc9d764b2d7ba2f5958f6c634a41 /core/java/android/text/TextUtils.java | |
| parent | 044644c71722c8094a69d7bc8e68f73032bf5c7c (diff) | |
Start moving text measurement into native code
We want to move text measurement into native code, mostly so that
alternate measurement for hyphens can be performant. This patch begins
that migration, in the main StaticLayout case, but still surfaces the
widths array to Java (for ellipsis calculation), and also includes a
hack (used mostly for testing) for computing widths in Java and sending
them down to native code when TextPaint is subclassed.
Change-Id: I476c9e8b3aa8e4e3552eb18f66c4bcd5683f3a72
Diffstat (limited to 'core/java/android/text/TextUtils.java')
| -rw-r--r-- | core/java/android/text/TextUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java index 1bb35f6bed35..676986d2335b 100644 --- a/core/java/android/text/TextUtils.java +++ b/core/java/android/text/TextUtils.java @@ -1259,7 +1259,7 @@ public class TextUtils { } // XXX this is probably ok, but need to look at it more - tempMt.setPara(format, 0, format.length(), textDir); + tempMt.setPara(format, 0, format.length(), textDir, null); float moreWid = tempMt.addStyleRun(p, tempMt.mLen, null); if (w + moreWid <= avail) { @@ -1281,7 +1281,7 @@ public class TextUtils { private static float setPara(MeasuredText mt, TextPaint paint, CharSequence text, int start, int end, TextDirectionHeuristic textDir) { - mt.setPara(text, start, end, textDir); + mt.setPara(text, start, end, textDir, null); float width; Spanned sp = text instanceof Spanned ? (Spanned) text : null; |
