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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2048863003: Reland of cc : Make LayerImpl destruction independent of tree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/tree_synchronizer.cc » ('j') | 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 7f535e8bf18bcad98a635dfbe14f3195d94a4693..5e50c247594982096c4f9c18c4bf93044614d3a2 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -96,9 +96,8 @@
}
void LayerTreeImpl::Shutdown() {
- if (root_layer_)
- RemoveLayer(root_layer_->id());
- root_layer_ = nullptr;
+ DetachLayers();
+ DCHECK(!root_layer_);
}
void LayerTreeImpl::ReleaseResources() {
@@ -315,11 +314,6 @@
std::unique_ptr<OwnedLayerImplList> ret = std::move(layers_);
layers_.reset(new OwnedLayerImplList);
return ret;
-}
-
-void LayerTreeImpl::ClearLayers() {
- SetRootLayer(nullptr);
- DCHECK(layers_->empty());
}
static void UpdateClipTreeForBoundsDeltaOnLayer(LayerImpl* layer,
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698