Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: src/core/SkBitmapCache.cpp

Issue 561953002: Make SkBitmapCache remove invalid bitmaps from the SkResourceCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cache: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common.gypi ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapCache.cpp
diff --git a/src/core/SkBitmapCache.cpp b/src/core/SkBitmapCache.cpp
index c954a3099e67d44232c1969a7e9814325b287e9b..6d4f4b4cc7d7349173f34048e9ba36a16cd1c508 100644
--- a/src/core/SkBitmapCache.cpp
+++ b/src/core/SkBitmapCache.cpp
@@ -71,8 +71,8 @@ static bool find_and_return(const BitmapKey& key, SkBitmap* result) {
if (result->getPixels()) {
return true;
}
- // todo: we should explicitly purge rec from the cache at this point, since
- // it is effectively purged already (has no memory behind it)
+
+ SkResourceCache::Remove(rec);
result->reset();
// fall-through to false
}
« no previous file with comments | « gyp/common.gypi ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698