diff options
Diffstat (limited to 'libs/hwui/GenerationCache.h')
| -rw-r--r-- | libs/hwui/GenerationCache.h | 6 |
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) { |