diff options
| author | Romain Guy <romainguy@google.com> | 2011-03-07 18:06:46 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2011-03-07 18:09:03 -0800 |
| commit | cabfcc1364eb7e4de0b15b3574fba45027b45cfc (patch) | |
| tree | f38e237ba2009dcacb5082a99928aad379a7adc0 /libs/hwui/TextDropShadowCache.h | |
| parent | 9b7146db6d9c0586b98b062fbcdb3fac6cc54d19 (diff) | |
| download | frameworks_base-cabfcc1364eb7e4de0b15b3574fba45027b45cfc.zip frameworks_base-cabfcc1364eb7e4de0b15b3574fba45027b45cfc.tar.gz frameworks_base-cabfcc1364eb7e4de0b15b3574fba45027b45cfc.tar.bz2 | |
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
Diffstat (limited to 'libs/hwui/TextDropShadowCache.h')
| -rw-r--r-- | libs/hwui/TextDropShadowCache.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libs/hwui/TextDropShadowCache.h b/libs/hwui/TextDropShadowCache.h index 62c4250..d46686d 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; + } + } + } } } } |
