diff options
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r-- | libs/hwui/PathCache.cpp | 5 |
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; } } |