diff options
Diffstat (limited to 'libs/hwui/DisplayListRenderer.cpp')
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 95fc2c5..2de70d4 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -1699,7 +1699,9 @@ status_t DisplayListRenderer::drawTextOnPath(const char* text, int bytesCount, i addFloat(hOffset); addFloat(vOffset); paint->setAntiAlias(true); - addPaint(paint); + SkPaint* addedPaint = addPaint(paint); + FontRenderer& fontRenderer = mCaches.fontRenderer->getFontRenderer(addedPaint); + fontRenderer.precache(addedPaint, text, count); return DrawGlInfo::kStatusDone; } @@ -1711,7 +1713,9 @@ status_t DisplayListRenderer::drawPosText(const char* text, int bytesCount, int addInt(count); addFloats(positions, count * 2); paint->setAntiAlias(true); - addPaint(paint); + SkPaint* addedPaint = addPaint(paint); + FontRenderer& fontRenderer = mCaches.fontRenderer->getFontRenderer(addedPaint); + fontRenderer.precache(addedPaint, text, count); return DrawGlInfo::kStatusDone; } @@ -1742,7 +1746,11 @@ status_t DisplayListRenderer::drawText(const char* text, int bytesCount, int cou addFloat(x); addFloat(y); addFloats(positions, count * 2); - addPaint(paint); + SkPaint* addedPaint = addPaint(paint); + if (!reject) { + FontRenderer& fontRenderer = mCaches.fontRenderer->getFontRenderer(addedPaint); + fontRenderer.precache(addedPaint, text, count); + } addFloat(length); addSkip(location); return DrawGlInfo::kStatusDone; |