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

Unified Diff: cc/tiles/software_image_decode_cache.h

Issue 2795803002: Clear Image Decode Cache on Navigation (Closed)
Patch Set: fix conversion Created 3 years, 8 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 | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_cache.h
diff --git a/cc/tiles/software_image_decode_cache.h b/cc/tiles/software_image_decode_cache.h
index 9032385278dd3207dd2fcad71f86daae236ae9a7..f29c47c4e12b9dffbfe8186b02440c6524f7e0a7 100644
--- a/cc/tiles/software_image_decode_cache.h
+++ b/cc/tiles/software_image_decode_cache.h
@@ -130,6 +130,7 @@ class CC_EXPORT SoftwareImageDecodeCache
// Software doesn't keep outstanding images pinned, so this is a no-op.
void SetShouldAggressivelyFreeResources(
bool aggressively_free_resources) override {}
+ void ClearCache() override;
// Decode the given image and store it in the cache. This is only called by an
// image decode task from a worker thread.
@@ -143,6 +144,8 @@ class CC_EXPORT SoftwareImageDecodeCache
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
+ size_t GetNumCacheEntriesForTesting() const { return decoded_images_.size(); }
+
private:
// DecodedImage is a convenience storage for discardable memory. It can also
// construct an image out of SkImageInfo and stored discardable memory.
« no previous file with comments | « cc/tiles/image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698