diff options
author | Scott Lobdell <slobdell@google.com> | 2020-11-05 18:29:12 -0800 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2020-11-13 11:48:49 -0800 |
commit | 3933f277a025be704e68ea593536e492831a7e05 (patch) | |
tree | 084aa5e0858c449a63dd18cc57fb21ab054d363a /libs/hwui/jni/Paint.cpp | |
parent | 248a6ce2e2ee65f367b01c43edeecef5a6d57581 (diff) | |
parent | 9c74513b2d828d5169e9942b58b2f93bb3e04aff (diff) |
Merge SP1A.201105.002
Change-Id: Iec83a0c1f6f286a1e51abfc4356633ca9d8aea5f
Diffstat (limited to 'libs/hwui/jni/Paint.cpp')
-rw-r--r-- | libs/hwui/jni/Paint.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libs/hwui/jni/Paint.cpp b/libs/hwui/jni/Paint.cpp index 89ff9b257642..3c86b28262b0 100644 --- a/libs/hwui/jni/Paint.cpp +++ b/libs/hwui/jni/Paint.cpp @@ -339,18 +339,13 @@ namespace PaintGlue { } static void doTextBounds(JNIEnv* env, const jchar* text, int count, jobject bounds, - const Paint& paint, const Typeface* typeface, jint bidiFlags) { + const Paint& paint, const Typeface* typeface, jint bidiFlagsInt) { SkRect r; SkIRect ir; - minikin::Layout layout = MinikinUtils::doLayout(&paint, - static_cast<minikin::Bidi>(bidiFlags), typeface, - text, count, // text buffer - 0, count, // draw range - 0, count, // context range - nullptr); minikin::MinikinRect rect; - layout.getBounds(&rect); + minikin::Bidi bidiFlags = static_cast<minikin::Bidi>(bidiFlagsInt); + MinikinUtils::getBounds(&paint, bidiFlags, typeface, text, count, &rect); r.fLeft = rect.mLeft; r.fTop = rect.mTop; r.fRight = rect.mRight; |