summaryrefslogtreecommitdiff
path: root/libs/hwui/TextDropShadowCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-12-04 18:30:28 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-12-04 18:30:28 +0000
commit85cdc25fe577821735fd8f019ecb033b36768d4e (patch)
treeb42f0f05913d3b3899ee9fb9705e0e0829722c72 /libs/hwui/TextDropShadowCache.cpp
parent9f93d375ce230603b03ed3fce1002f9648f4a667 (diff)
parent086847797142a25e9e21611e9864c53abfca174f (diff)
Merge "Correct shadowtext glyph count"
Diffstat (limited to 'libs/hwui/TextDropShadowCache.cpp')
-rw-r--r--libs/hwui/TextDropShadowCache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index 996ac8ebc447..51f16523966b 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -83,7 +83,7 @@ int ShadowText::compare(const ShadowText& lhs, const ShadowText& rhs) {
if (!lhs.positions) return -1;
if (!rhs.positions) return +1;
- return memcmp(lhs.positions, rhs.positions, lhs.glyphCount << 1);
+ return memcmp(lhs.positions, rhs.positions, lhs.glyphCount * sizeof(float) * 2);
}
return 0;
@@ -169,7 +169,7 @@ void TextDropShadowCache::clear() {
ShadowTexture* TextDropShadowCache::get(const SkPaint* paint, const char* glyphs, int numGlyphs,
float radius, const float* positions) {
- ShadowText entry(paint, radius, numGlyphs * 2, glyphs, positions);
+ ShadowText entry(paint, radius, numGlyphs, glyphs, positions);
ShadowTexture* texture = mCache.get(entry);
if (!texture) {