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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | 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 bf706b6149cc5476cea675444c58ae1166c9fa3b..7e7adfea6dfbce52863befa3dde43d44acc1ed91 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1197,17 +1197,17 @@ void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(bool block) {
void LayerTreeHostImpl::ResetTreesForTesting() {
if (active_tree_)
- active_tree_->DetachLayerTree();
+ active_tree_->ClearLayers();
active_tree_ =
LayerTreeImpl::create(this, active_tree()->page_scale_factor(),
active_tree()->top_controls_shown_ratio(),
active_tree()->elastic_overscroll());
active_tree_->property_trees()->is_active = true;
if (pending_tree_)
- pending_tree_->DetachLayerTree();
+ pending_tree_->ClearLayers();
pending_tree_ = nullptr;
if (recycle_tree_)
- recycle_tree_->DetachLayerTree();
+ recycle_tree_->ClearLayers();
recycle_tree_ = nullptr;
}
@@ -1957,11 +1957,10 @@ void LayerTreeHostImpl::ActivateSyncTree() {
pending_tree_->ProcessUIResourceRequestQueue();
if (pending_tree_->needs_full_tree_sync()) {
- active_tree_->SetRootLayer(
- TreeSynchronizer::SynchronizeTrees(pending_tree_->root_layer(),
- active_tree_->DetachLayerTree(),
- active_tree_.get()));
+ TreeSynchronizer::SynchronizeTrees(pending_tree_->root_layer(),
+ active_tree_.get());
}
+
// We need to preserve the damage status of property trees on active tree.
// We do this by pushing the damage status from active tree property trees
// to pending tree property trees.
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698