summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GenerationCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/GenerationCache.h')
-rw-r--r--libs/hwui/GenerationCache.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/hwui/GenerationCache.h b/libs/hwui/GenerationCache.h
index c358c80..c42a5d8 100644
--- a/libs/hwui/GenerationCache.h
+++ b/libs/hwui/GenerationCache.h
@@ -143,11 +143,7 @@ void GenerationCache<K, V>::put(K key, V value) {
}
ssize_t index = mCache.indexOfKey(key);
- if (index >= 0) {
- sp<Entry<K, V> > entry = mCache.valueAt(index);
- detachFromCache(entry);
- addToCache(entry, key, value);
- } else {
+ if (index < 0) {
sp<Entry<K, V> > entry = new Entry<K, V>;
addToCache(entry, key, value);
}