summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextDropShadowCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/TextDropShadowCache.cpp')
-rw-r--r--libs/hwui/TextDropShadowCache.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index bef1373..8426f58 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -102,13 +102,15 @@ void TextDropShadowCache::clear() {
}
ShadowTexture* TextDropShadowCache::get(SkPaint* paint, const char* text, uint32_t len,
- int numGlyphs, uint32_t radius) {
- ShadowText entry(paint, radius, len, text);
+ int numGlyphs, uint32_t radius, const float* positions) {
+ ShadowText entry(paint, radius, len, text, positions);
ShadowTexture* texture = mCache.get(entry);
if (!texture) {
- FontRenderer::DropShadow shadow = mRenderer->renderDropShadow(paint, text, 0,
- len, numGlyphs, radius);
+ SkPaint paintCopy(*paint);
+ paintCopy.setTextAlign(SkPaint::kLeft_Align);
+ FontRenderer::DropShadow shadow = mRenderer->renderDropShadow(&paintCopy, text, 0,
+ len, numGlyphs, radius, positions);
texture = new ShadowTexture;
texture->left = shadow.penX;