summaryrefslogtreecommitdiff
path: root/libs/hwui/TextDropShadowCache.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-08-23 21:05:08 -0700
committer Romain Guy <romainguy@google.com> 2010-08-24 17:18:14 -0700
commitfb8b763f762ae21923c58d64caa729b012f40e05 (patch)
tree013792d41f32bff4dd35e6d53eebac711c513729 /libs/hwui/TextDropShadowCache.h
parenta1f1174b396cda7bdff469a2e974a737600c5eb0 (diff)
Use only one GL context per process, share chaches.
Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11
Diffstat (limited to 'libs/hwui/TextDropShadowCache.h')
-rw-r--r--libs/hwui/TextDropShadowCache.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/libs/hwui/TextDropShadowCache.h b/libs/hwui/TextDropShadowCache.h
index c3be4832b93f..b65d62acc522 100644
--- a/libs/hwui/TextDropShadowCache.h
+++ b/libs/hwui/TextDropShadowCache.h
@@ -69,16 +69,16 @@ struct ShadowText {
char *text;
bool operator<(const ShadowText& rhs) const {
- if (len < rhs.len) return true;
- else if (len == rhs.len) {
- if (radius < rhs.radius) return true;
- else if (radius == rhs.radius) {
- if (textSize < rhs.textSize) return true;
- else if (textSize == rhs.textSize) {
- if (typeface < rhs.typeface) return true;
- else if (typeface == rhs.typeface) {
- if (hash < rhs.hash) return true;
- if (hash == rhs.hash) {
+ if (hash < rhs.hash) return true;
+ else if (hash == rhs.hash) {
+ if (len < rhs.len) return true;
+ else if (len == rhs.len) {
+ if (radius < rhs.radius) return true;
+ else if (radius == rhs.radius) {
+ if (textSize < rhs.textSize) return true;
+ else if (textSize == rhs.textSize) {
+ if (typeface < rhs.typeface) return true;
+ else if (typeface == rhs.typeface) {
return strncmp(text, rhs.text, len) < 0;
}
}
@@ -102,6 +102,7 @@ struct ShadowTexture: public Texture {
class TextDropShadowCache: public OnEntryRemoved<ShadowText, ShadowTexture*> {
public:
+ TextDropShadowCache();
TextDropShadowCache(uint32_t maxByteSize);
~TextDropShadowCache();