Index: cc/tiles/image_controller.cc |
diff --git a/cc/tiles/image_controller.cc b/cc/tiles/image_controller.cc |
index ae81e64f96d06211f771c146df9d4263a4436a14..698dc79e2510b8cf78edfc2239cfde3dff78b49c 100644 |
--- a/cc/tiles/image_controller.cc |
+++ b/cc/tiles/image_controller.cc |
@@ -127,12 +127,15 @@ void ImageController::SetImageDecodeCache(ImageDecodeCache* cache) { |
SetPredecodeImages(std::vector<DrawImage>(), |
ImageDecodeCache::TracingInfo()); |
StopWorkerTasks(); |
+ image_cache_max_limit_bytes_ = 0u; |
} |
cache_ = cache; |
- if (cache_) |
+ if (cache_) { |
+ image_cache_max_limit_bytes_ = cache_->GetMaximumMemoryLimitBytes(); |
GenerateTasksForOrphanedRequests(); |
+ } |
} |
void ImageController::GetTasksForImagesAndRef( |