From fb8b763f762ae21923c58d64caa729b012f40e05 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 23 Aug 2010 21:05:08 -0700 Subject: Use only one GL context per process, share chaches. Change-Id: Ieabaa25338d2f4b8d4fd90e7401ad6e7452eae11 --- libs/hwui/TextDropShadowCache.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'libs/hwui/TextDropShadowCache.h') 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 { public: + TextDropShadowCache(); TextDropShadowCache(uint32_t maxByteSize); ~TextDropShadowCache(); -- cgit v1.2.3-59-g8ed1b