| 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 62e587ce860fceb390dcb40e31992f43b843aa36..7da2e05c62d0b5750ef825c4d0f50b64479041a6 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -243,6 +243,9 @@ LayerTreeHostImpl::LayerTreeHostImpl(
|
| has_scrolled_by_wheel_(false),
|
| has_scrolled_by_touch_(false),
|
| touchpad_and_wheel_scroll_latching_enabled_(false),
|
| +#if DCHECK_IS_ON()
|
| + sync_state_(NOT_SYNCING),
|
| +#endif
|
| impl_thread_phase_(ImplThreadPhase::IDLE) {
|
| DCHECK(mutator_host_);
|
| mutator_host_->SetMutatorHostClient(this);
|
| @@ -2046,6 +2049,8 @@ void LayerTreeHostImpl::CreatePendingTree() {
|
|
|
| void LayerTreeHostImpl::ActivateSyncTree() {
|
| if (pending_tree_) {
|
| + DCHECK(AdvanceSyncState(BEGINNING_SYNC));
|
| +
|
| TRACE_EVENT_ASYNC_END0("cc", "PendingTree:waiting", pending_tree_.get());
|
|
|
| DCHECK(pending_tree_duration_timer_);
|
| @@ -2073,14 +2078,23 @@ void LayerTreeHostImpl::ActivateSyncTree() {
|
| else
|
| active_tree_->MoveChangeTrackingToLayers();
|
| }
|
| - TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree());
|
| +
|
| active_tree_->property_trees()->PushOpacityIfNeeded(
|
| pending_tree_->property_trees());
|
| + pending_tree_->PushPropertyTreesTo(active_tree_.get());
|
| + DCHECK(AdvanceSyncState(SYNCED_PROPERTY_TREES));
|
| +
|
| + TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree());
|
| + DCHECK(AdvanceSyncState(SYNCED_LAYER_PROPERTIES));
|
|
|
| pending_tree_->PushPropertiesTo(active_tree_.get());
|
| + DCHECK(AdvanceSyncState(SYNCED_LAYER_TREE_HOST_PROPERTIES));
|
| +
|
| if (!pending_tree_->LayerListIsEmpty())
|
| pending_tree_->property_trees()->ResetAllChangeTracking();
|
|
|
| + DCHECK(AdvanceSyncState(NOT_SYNCING));
|
| +
|
| // 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.
|
|
|