summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-08-06 11:18:34 -0700
committer Romain Guy <romainguy@google.com> 2010-08-06 11:18:34 -0700
commit22158e139a3d6c6a9787ca0de224e9368f643284 (patch)
treefac1da337f6fd11ef0761bd0a776af7f184b0ec7 /libs/hwui/PathCache.cpp
parentff0f973442d22ba6bb1231fb6e97e5f3051a7f48 (diff)
Automatically cleanup textures that don't fit in the cache.
Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 67a5f923d598..fa6ea2591cc8 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -88,7 +88,6 @@ PathTexture* PathCache::get(SkPath* path, SkPaint* paint) {
texture = addTexture(entry, path, paint);
}
- // TODO: Do something to destroy the texture object if it's too big for the cache
return texture;
}
@@ -129,6 +128,8 @@ PathTexture* PathCache::addTexture(const PathCacheEntry& entry,
if (size < mMaxSize) {
mSize += size;
mCache.put(entry, texture);
+ } else {
+ texture->cleanup = true;
}
return texture;