From eb99356a0548684a501766e6a524529ab93304c8 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 5 Oct 2010 18:14:38 -0700 Subject: Optimize saveLayer() when the clip flag is set. This speeds up applications, especially Launcher. --- libs/hwui/GenerationCache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/hwui/GenerationCache.h') diff --git a/libs/hwui/GenerationCache.h b/libs/hwui/GenerationCache.h index 070e33fb4621..35c6bea7cd2b 100644 --- a/libs/hwui/GenerationCache.h +++ b/libs/hwui/GenerationCache.h @@ -65,6 +65,7 @@ public: void put(K key, V value); V remove(K key); V removeOldest(); + V getValueAt(uint32_t index) const; uint32_t size() const; @@ -127,6 +128,11 @@ K GenerationCache::getKeyAt(uint32_t index) const { return mCache.keyAt(index); } +template +V GenerationCache::getValueAt(uint32_t index) const { + return mCache.valueAt(index); +} + template V GenerationCache::get(K key) { ssize_t index = mCache.indexOfKey(key); -- cgit v1.2.3-59-g8ed1b