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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2873313004: Harmonize LayerTreeHost/LayerTreeHostImpl synchronization steps (Closed)
Patch Set: Ace of rebase 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
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_impl.h » ('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 2435b5f93ad2d6c901f6ddefd6f34e4185a7a3a5..05f4c7d964289c7b85260da91a6ffaf1559d45ed 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2083,6 +2083,7 @@ void LayerTreeHostImpl::PushScrollbarOpacitiesFromActiveToPending() {
void LayerTreeHostImpl::ActivateSyncTree() {
if (pending_tree_) {
TRACE_EVENT_ASYNC_END0("cc", "PendingTree:waiting", pending_tree_.get());
+ active_tree_->lifecycle().AdvanceTo(LayerTreeLifecycle::kBeginningSync);
DCHECK(pending_tree_duration_timer_);
// Reset will call the destructor and log the timer histogram.
@@ -2098,25 +2099,21 @@ void LayerTreeHostImpl::ActivateSyncTree() {
active_tree_.get());
}
- // Property trees may store damage status. We preserve the active tree
- // damage status by pushing the damage status from active tree property
- // trees to pending tree property trees or by moving it onto the layers.
- if (active_tree_->property_trees()->changed) {
- if (pending_tree_->property_trees()->sequence_number ==
- active_tree_->property_trees()->sequence_number)
- active_tree_->property_trees()->PushChangeTrackingTo(
- pending_tree_->property_trees());
- else
- active_tree_->MoveChangeTrackingToLayers();
- }
- TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree());
-
PushScrollbarOpacitiesFromActiveToPending();
+ pending_tree_->PushPropertyTreesTo(active_tree_.get());
+ active_tree_->lifecycle().AdvanceTo(
+ LayerTreeLifecycle::kSyncedPropertyTrees);
+
+ TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree());
+ active_tree_->lifecycle().AdvanceTo(
+ LayerTreeLifecycle::kSyncedLayerProperties);
pending_tree_->PushPropertiesTo(active_tree_.get());
if (!pending_tree_->LayerListIsEmpty())
pending_tree_->property_trees()->ResetAllChangeTracking();
+ active_tree_->lifecycle().AdvanceTo(LayerTreeLifecycle::kNotSyncing);
+
// Now that we've synced everything from the pending tree to the active
// tree, rename the pending tree the recycle tree so we can reuse it on the
// next sync.
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698