summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
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 4975edb..59903b7 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -93,11 +93,13 @@ Texture* TextureCache::get(SkBitmap* bitmap) {
if (size < mMaxSize) {
mSize += size;
mCache.put(bitmap, texture);
+ } else {
+ texture->cleanup = true;
}
} else if (bitmap->getGenerationID() != texture->generation) {
generateTexture(bitmap, texture, true);
}
- // TODO: Do something to destroy the texture object if it's too big for the cache
+
return texture;
}