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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 2795803002: Clear Image Decode Cache on Navigation (Closed)
Patch Set: Created 3 years, 9 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
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index dd5757625302089ca8b7d2b2de1f91364218f9fe..96f11468c58b5f515b2b1727490f79af80e30cd1 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -317,6 +317,11 @@ void LayerTreeHost::FinishCommitOnImplThread(
sync_tree->SetDeviceScaleFactor(device_scale_factor_);
host_impl->SetDebugState(debug_state_);
+ if (did_navigate_) {
+ did_navigate_ = false;
+ host_impl->ClearCachesOnNavigation();
+ }
+
sync_tree->set_ui_resource_request_queue(
ui_resource_manager_->TakeUIResourcesRequests());
@@ -875,6 +880,7 @@ void LayerTreeHost::SetRootLayer(scoped_refptr<Layer> root_layer) {
ResetGpuRasterizationTracking();
SetNeedsFullTreeSync();
+ did_navigate_ = true;
}
void LayerTreeHost::RegisterViewportLayers(

Powered by Google App Engine
This is Rietveld 408576698