summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-08-22 00:36:33 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-08-22 00:36:33 +0000
commite0a2435cb390c4333e3d40ede4d163566d779962 (patch)
tree663333c6807e825adceecee90c99d9d388e8aa68 /libs/hwui/PathCache.cpp
parentf479906939ad463feb50a3edaabb2aa77d100723 (diff)
parent0a8c51b1d0d66d6060afcec1eab33091d49332ae (diff)
Merge "Properly account for created paths in the cache" into klp-dev
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 70ab6e7df66a..25afe63267fe 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -283,6 +283,11 @@ void PathCache::generateTexture(const PathDescription& entry, SkBitmap* bitmap,
mCache.put(entry, texture);
}
} else {
+ // It's okay to add a texture that's bigger than the cache since
+ // we'll trim the cache later when addToCache is set to false
+ if (!addToCache) {
+ mSize += size;
+ }
texture->cleanup = true;
}
}