| 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 9f664fcc0ee40385784ff1cf74c61cc32fcf5371..172273a99c7adbd054699955d7e45198fbd6dae4 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -254,7 +254,10 @@ void LayerTreeHostImpl::CommitComplete() {
|
| pending_tree_->set_needs_update_draw_properties();
|
| pending_tree_->UpdateDrawProperties();
|
| // Start working on newly created tiles immediately if needed.
|
| - ManageTiles();
|
| + if (!manage_tiles_needed_)
|
| + client_->NotifyReadyToActivate();
|
| + else
|
| + ManageTiles();
|
| } else {
|
| active_tree_->set_needs_update_draw_properties();
|
| }
|
| @@ -1085,10 +1088,7 @@ void LayerTreeHostImpl::DidInitializeVisibleTile() {
|
| }
|
|
|
| void LayerTreeHostImpl::NotifyReadyToActivate() {
|
| - if (pending_tree_) {
|
| - need_to_update_visible_tiles_before_draw_ = true;
|
| - ActivatePendingTree();
|
| - }
|
| + client_->NotifyReadyToActivate();
|
| }
|
|
|
| bool LayerTreeHostImpl::ShouldClearRootRenderPass() const {
|
| @@ -1476,6 +1476,8 @@ void LayerTreeHostImpl::ActivatePendingTree() {
|
| CHECK(pending_tree_);
|
| TRACE_EVENT_ASYNC_END0("cc", "PendingTree", pending_tree_.get());
|
|
|
| + need_to_update_visible_tiles_before_draw_ = true;
|
| +
|
| active_tree_->SetRootLayerScrollOffsetDelegate(NULL);
|
| active_tree_->PushPersistedState(pending_tree_.get());
|
| if (pending_tree_->needs_full_tree_sync()) {
|
| @@ -1504,6 +1506,10 @@ void LayerTreeHostImpl::ActivatePendingTree() {
|
| root_layer_scroll_offset_delegate_);
|
| active_tree_->DidBecomeActive();
|
|
|
| + client_->DidActivatePendingTree();
|
| + if (!tree_activation_callback_.is_null())
|
| + tree_activation_callback_.Run();
|
| +
|
| // Reduce wasted memory now that unlinked resources are guaranteed not
|
| // to be used.
|
| client_->ReduceWastedContentsTextureMemoryOnImplThread();
|
| @@ -1520,10 +1526,6 @@ void LayerTreeHostImpl::ActivatePendingTree() {
|
| stats.main_stats.paint_time + stats.main_stats.record_time +
|
| stats.impl_stats.rasterize_time_for_now_bins_on_pending_tree);
|
| }
|
| -
|
| - client_->DidActivatePendingTree();
|
| - if (!tree_activation_callback_.is_null())
|
| - tree_activation_callback_.Run();
|
| }
|
|
|
| void LayerTreeHostImpl::SetVisible(bool visible) {
|
|
|