From cabfcc1364eb7e4de0b15b3574fba45027b45cfc Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 7 Mar 2011 18:06:46 -0800 Subject: Add support for partial invalidates in WebView Bug #3461349 This change also fixes two bugs that prevented partial invalidates from working with other views. Both bugs were in our EGL implementation: they were preventing the caller from comparing the current context/surface with another context/surface. This was causing HardwareRenderer to always redraw the entire screen. Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5 --- libs/hwui/TextDropShadowCache.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'libs/hwui/TextDropShadowCache.h') diff --git a/libs/hwui/TextDropShadowCache.h b/libs/hwui/TextDropShadowCache.h index 62c425013f80..d46686d90845 100644 --- a/libs/hwui/TextDropShadowCache.h +++ b/libs/hwui/TextDropShadowCache.h @@ -42,6 +42,17 @@ struct ShadowText { textSize = paint->getTextSize(); typeface = paint->getTypeface(); + + flags = 0; + if (paint->isFakeBoldText()) { + flags |= Font::kFakeBold; + } + + const float skewX = paint->getTextSkewX(); + italicStyle = *(uint32_t*) &skewX; + + const float scaleXFloat = paint->getTextScaleX(); + scaleX = *(uint32_t*) &scaleXFloat; } ~ShadowText() { @@ -51,6 +62,9 @@ struct ShadowText { uint32_t len; float textSize; SkTypeface* typeface; + uint32_t flags; + uint32_t italicStyle; + uint32_t scaleX; const char16_t* text; String16 str; @@ -65,7 +79,13 @@ struct ShadowText { LTE_INT(radius) { LTE_FLOAT(textSize) { LTE_INT(typeface) { - return strncmp16(text, rhs.text, len >> 1) < 0; + LTE_INT(flags) { + LTE_INT(italicStyle) { + LTE_INT(scaleX) { + return strncmp16(text, rhs.text, len >> 1) < 0; + } + } + } } } } -- cgit v1.2.3-59-g8ed1b