diff options
author | Behdad Esfahbod <behdad@google.com> | 2014-07-25 19:30:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-24 15:37:54 +0000 |
commit | c437f6eef2e92fd1ca1c542a8e41315253ec7747 (patch) | |
tree | 86167820487cf016778358da4c2881596ba0298e /core/jni/android_view_GLES20Canvas.cpp | |
parent | b9333b5970911343950900a6f46dcbbd6d920ce9 (diff) | |
parent | 63c5c78a72a21d57913e8601cc2a1ab72a424a02 (diff) | |
download | frameworks_base-c437f6eef2e92fd1ca1c542a8e41315253ec7747.zip frameworks_base-c437f6eef2e92fd1ca1c542a8e41315253ec7747.tar.gz frameworks_base-c437f6eef2e92fd1ca1c542a8e41315253ec7747.tar.bz2 |
Merge "Further centralize Minikin interaction" into lmp-dev
Diffstat (limited to 'core/jni/android_view_GLES20Canvas.cpp')
-rw-r--r-- | core/jni/android_view_GLES20Canvas.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp index 0a259aa..3cd031e 100644 --- a/core/jni/android_view_GLES20Canvas.cpp +++ b/core/jni/android_view_GLES20Canvas.cpp @@ -620,8 +620,7 @@ static void renderTextLayout(DisplayListRenderer* renderer, Layout* layout, static void renderText(DisplayListRenderer* renderer, const jchar* text, int count, jfloat x, jfloat y, int bidiFlags, Paint* paint, TypefaceImpl* typeface) { Layout layout; - std::string css = MinikinUtils::setLayoutProperties(&layout, paint, bidiFlags, typeface); - layout.doLayout(text, 0, count, count, css); + MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, text, 0, count, count); x += MinikinUtils::xOffsetForTextAlign(paint, layout); renderTextLayout(renderer, &layout, x, y, paint); } @@ -655,8 +654,7 @@ static void renderTextOnPath(DisplayListRenderer* renderer, const jchar* text, i SkPath* path, jfloat hOffset, jfloat vOffset, int bidiFlags, Paint* paint, TypefaceImpl* typeface) { Layout layout; - std::string css = MinikinUtils::setLayoutProperties(&layout, paint, bidiFlags, typeface); - layout.doLayout(text, 0, count, count, css); + MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, text, 0, count, count); hOffset += MinikinUtils::hOffsetForTextAlign(paint, layout, *path); Paint::Align align = paint->getTextAlign(); paint->setTextAlign(Paint::kLeft_Align); @@ -670,8 +668,7 @@ static void renderTextRun(DisplayListRenderer* renderer, const jchar* text, jint start, jint count, jint contextCount, jfloat x, jfloat y, int bidiFlags, Paint* paint, TypefaceImpl* typeface) { Layout layout; - std::string css = MinikinUtils::setLayoutProperties(&layout, paint, bidiFlags, typeface); - layout.doLayout(text, start, count, contextCount, css); + MinikinUtils::doLayout(&layout, paint, bidiFlags, typeface, text, start, count, contextCount); x += MinikinUtils::xOffsetForTextAlign(paint, layout); renderTextLayout(renderer, &layout, x, y, paint); } |