summaryrefslogtreecommitdiff
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@android.com> 2014-02-26 18:47:59 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-02-26 18:48:00 +0000
commitc3bac8a096cc5661cf91c8c0aa9b7dd0fc099c5d (patch)
tree65bd93bc54c55941cd409d68c8273cd8eb6bc165 /libs/hwui/TextureCache.cpp
parent2ba70fd49bfcbb516e75c198c106764609335feb (diff)
parent36fad8f6fcfbc2087b910600ed5a6f9741177d00 (diff)
Merge "Fix graphics corruption caused by HWUI caches"
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index ed0a79aac56a..54a206bb2955 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -184,7 +184,9 @@ void TextureCache::clearGarbage() {
Mutex::Autolock _l(mLock);
size_t count = mGarbage.size();
for (size_t i = 0; i < count; i++) {
- mCache.remove(mGarbage.itemAt(i));
+ const SkBitmap* bitmap = mGarbage.itemAt(i);
+ mCache.remove(bitmap);
+ delete bitmap;
}
mGarbage.clear();
}