summaryrefslogtreecommitdiff
path: root/libs/hwui/GenerationCache.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-10-05 18:16:35 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-10-05 18:16:35 -0700
commit1e14f49d06b871d8101e33c47ba34b87c3c8089d (patch)
treec304de50878ea70f36b2228aa8fe735270bd510c /libs/hwui/GenerationCache.h
parent0f8ee7439a0c0487b023f6b150ba0f9986a6cb15 (diff)
parenteb99356a0548684a501766e6a524529ab93304c8 (diff)
Merge "Optimize saveLayer() when the clip flag is set."
Diffstat (limited to 'libs/hwui/GenerationCache.h')
-rw-r--r--libs/hwui/GenerationCache.h6
1 files changed, 6 insertions, 0 deletions
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;
@@ -128,6 +129,11 @@ K GenerationCache<K, V>::getKeyAt(uint32_t index) const {
}
template<typename K, typename V>
+V GenerationCache<K, V>::getValueAt(uint32_t index) const {
+ return mCache.valueAt(index);
+}
+
+template<typename K, typename V>
V GenerationCache<K, V>::get(K key) {
ssize_t index = mCache.indexOfKey(key);
if (index >= 0) {