| Index: cc/trees/layer_tree_impl.cc
|
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
|
| index eadc4043ab43621b06a0cc02fd7f4d000651856b..03a100e5ea1c7faed41f947b37f86d112c34e585 100644
|
| --- a/cc/trees/layer_tree_impl.cc
|
| +++ b/cc/trees/layer_tree_impl.cc
|
| @@ -252,13 +252,7 @@ void LayerTreeImpl::UpdateSolidColorScrollbars() {
|
| }
|
| }
|
|
|
| -struct UpdateTilePrioritiesForLayer {
|
| - void operator()(LayerImpl *layer) {
|
| - layer->UpdateTilePriorities();
|
| - }
|
| -};
|
| -
|
| -void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
|
| +void LayerTreeImpl::UpdateDrawProperties() {
|
| if (IsActiveTree() && RootScrollLayer() && RootClipLayer())
|
| UpdateRootScrollLayerSizeDelta();
|
|
|
| @@ -275,13 +269,6 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
|
| RootClipLayer()->SetMasksToBounds(false);
|
| }
|
|
|
| - if (!needs_update_draw_properties_) {
|
| - if (reason == UPDATE_ACTIVE_TREE_FOR_DRAW && root_layer())
|
| - LayerTreeHostCommon::CallFunctionForSubtree<UpdateTilePrioritiesForLayer>(
|
| - root_layer());
|
| - return;
|
| - }
|
| -
|
| needs_update_draw_properties_ = false;
|
| render_surface_layer_list_.clear();
|
|
|
| @@ -303,9 +290,12 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
|
| "LayerTreeImpl::UpdateDrawProperties",
|
| "IsActive",
|
| IsActiveTree());
|
| +
|
| + base::TimeTicks frame_time = CurrentFrameTime();
|
| bool update_tile_priorities =
|
| - reason == UPDATE_PENDING_TREE ||
|
| - reason == UPDATE_ACTIVE_TREE_FOR_DRAW;
|
| + frame_time != frame_time_last_update_tile_priorities_;
|
| + frame_time_last_update_tile_priorities_ = frame_time;
|
| +
|
| LayerTreeHostCommon::CalculateDrawProperties(
|
| root_layer(),
|
| device_viewport_size(),
|
| @@ -318,7 +308,7 @@ void LayerTreeImpl::UpdateDrawProperties(UpdateDrawPropertiesReason reason) {
|
| }
|
|
|
| DCHECK(!needs_update_draw_properties_) <<
|
| - "calcDrawProperties should not set_needs_update_draw_properties()";
|
| + "CalcDrawProperties should not set_needs_update_draw_properties()";
|
| }
|
|
|
| static void ClearRenderSurfacesOnLayerImplRecursive(LayerImpl* current) {
|
| @@ -382,6 +372,9 @@ void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pending_tree) {
|
| int id = currently_scrolling_layer_ ? currently_scrolling_layer_->id() : 0;
|
| pending_tree->SetCurrentlyScrollingLayer(
|
| LayerTreeHostCommon::FindLayerInSubtree(pending_tree->root_layer(), id));
|
| +
|
| + frame_time_last_update_tile_priorities_ =
|
| + pending_tree->frame_time_last_update_tile_priorities_;
|
| }
|
|
|
| static void DidBecomeActiveRecursive(LayerImpl* layer) {
|
|
|