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

Unified Diff: cc/tiles/software_image_decode_cache.cc

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/software_image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache_unittest.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.cc
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index a113be9dd198ca6faeb12bb6092c98033554cea9..c40e5561bbd40c35efd77fab9d421e01f068a2a3 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -818,6 +818,11 @@ void SoftwareImageDecodeCache::ReduceCacheUsage() {
ReduceCacheUsageUntilWithinLimit(max_items_in_cache_);
}
+void SoftwareImageDecodeCache::ClearCache() {
+ base::AutoLock lock(lock_);
+ ReduceCacheUsageUntilWithinLimit(0);
+}
+
void SoftwareImageDecodeCache::RemovePendingTask(const ImageKey& key,
DecodeTaskType task_type) {
base::AutoLock lock(lock_);
« no previous file with comments | « cc/tiles/software_image_decode_cache.h ('k') | cc/tiles/software_image_decode_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698