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

Unified Diff: src/core/SkBitmapCache.h

Issue 825263005: notify resource caches when pixelref genID goes stale (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add test for purge notifications Created 5 years, 10 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 | « no previous file | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapCache.h
diff --git a/src/core/SkBitmapCache.h b/src/core/SkBitmapCache.h
index ec8a6b803e9cf69196053a45213565c004c401d3..abda1b4d6692ef9cf64840b486ef0753b317fa12 100644
--- a/src/core/SkBitmapCache.h
+++ b/src/core/SkBitmapCache.h
@@ -48,12 +48,22 @@ public:
*/
static bool Add(uint32_t genID, const SkIRect& subset, const SkBitmap& result,
SkResourceCache* localCache = NULL);
+
+ /**
+ * Call this to (as a hint) preemptively purge caches related to this genID
+ */
+ static void NotifyGenIDStale(uint32_t);
};
class SkMipMapCache {
public:
static const SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* localCache = NULL);
static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* localCache = NULL);
+
+ /**
+ * Call this to (as a hint) preemptively purge caches related to this genID
+ */
+ static void NotifyGenIDStale(uint32_t);
};
#endif
« no previous file with comments | « no previous file | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698