summaryrefslogtreecommitdiff
path: root/libs/hwui/TextDropShadowCache.cpp
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-07-19 22:48:17 -0700
committerRaph Levien <raph@google.com>2012-07-20 12:55:30 -0700
commit416a847633680d94efb926837efdc18726d54918 (patch)
tree0a5d914259e9ae5fa040e179ba5630d7102a49ad /libs/hwui/TextDropShadowCache.cpp
parent592b29f4ad3d46b483b2d6ed2c5cfac8d139afe8 (diff)
Add drop shadow for drawPosText in hwui renderer.
This patch adds support for drop shadows (setShadowLayer) for drawPosText in the hwui renderer. In and of itself, it's not very important, but it's on the critical path for correct mark positioning, tracked as bug 5443796. The change itself is fairly straightforward - it basically just adds an extra "positions" argument to all draw and measure methods on the code path for drawing drop shadowed text, as well as to the cache key for cached shadow textures. Change-Id: Ic1cb63299ba61ccbef31779459ecb82aa4a5e672
Diffstat (limited to 'libs/hwui/TextDropShadowCache.cpp')
-rw-r--r--libs/hwui/TextDropShadowCache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index bef137371d44..93aa8a5c0af3 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -102,13 +102,13 @@ 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);
+ len, numGlyphs, radius, positions);
texture = new ShadowTexture;
texture->left = shadow.penX;