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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2869513002: cc: Clear checker-image tracking on navigation and visibility changes. (Closed)
Patch Set: comment Created 3 years, 7 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
« cc/tiles/checker_image_tracker.h ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index b8d25afce74bc79b87f99037202737c75b5e928c..458fecab85fe70a388fbc49ddc83c775159d2fb8 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1280,6 +1280,11 @@ void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
// running work.
if (image_decode_cache_)
image_decode_cache_->SetShouldAggressivelyFreeResources(false);
+ } else {
+ // Clear checkered image state so we unlock cached images. Since we will be
+ // evicting all tile resources and images from the ImageDecodeCache, this
+ // also ensures that we re-checker these images.
+ tile_manager_.ClearCheckerImageTracking();
vmpstr 2017/05/09 22:06:21 Can you verify what happens in a resourceless soft
Khushal 2017/05/10 00:53:17 Do you think this is okay for the general case? In
}
DCHECK(resource_pool_);
@@ -2339,6 +2344,7 @@ LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() {
}
void LayerTreeHostImpl::ClearImageCacheOnNavigation() {
+ tile_manager_.ClearCheckerImageTracking();
if (image_decode_cache_)
image_decode_cache_->ClearCache();
}
« cc/tiles/checker_image_tracker.h ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698