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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2468023002: Don't free non-tile resources on GPU rasterization toggle (Closed)
Patch Set: fix unittest Created 4 years, 1 month 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/trees/layer_tree_impl.h ('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_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 0cb342d2d9beb565c3ab39c89ab4890499596c99..fe58b2cba289ae370c42fdcb216a1e7e3f5ae0d0 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -124,10 +124,17 @@ void LayerTreeImpl::ReleaseResources() {
}
}
-void LayerTreeImpl::RecreateResources() {
+void LayerTreeImpl::ReleaseTileResources() {
if (!LayerListIsEmpty()) {
LayerTreeHostCommon::CallFunctionForEveryLayer(
- this, [](LayerImpl* layer) { layer->RecreateResources(); });
+ this, [](LayerImpl* layer) { layer->ReleaseTileResources(); });
+ }
+}
+
+void LayerTreeImpl::RecreateTileResources() {
+ if (!LayerListIsEmpty()) {
+ LayerTreeHostCommon::CallFunctionForEveryLayer(
+ this, [](LayerImpl* layer) { layer->RecreateTileResources(); });
}
}
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698