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_); |