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

Unified Diff: cc/layers/layer_impl.cc

Issue 595913002: [Android] Avoid setting update_draw_properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 5c9eada05addd2181ad8ea1a5d9a46a83d15bff2..29bdfe778fdf522fc9a3a8f97d74ef4adb90b71c 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1295,23 +1295,24 @@ void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
scrollbar_needs_animation |=
scrollbar_layer->SetVisibleToTotalLengthRatio(visible_ratio);
}
-
- layer_tree_impl()->set_needs_update_draw_properties();
- // TODO(wjmaclean) The scrollbar animator for the pinch-zoom scrollbars should
- // activate for every scroll on the main frame, not just the scrolls that move
- // the pinch virtual viewport (i.e. trigger from either inner or outer
- // viewport).
- if (scrollbar_animation_controller_ && scrollbar_needs_animation) {
- // When both non-overlay and overlay scrollbars are both present, don't
- // animate the overlay scrollbars when page scale factor is at the min.
- // Non-overlay scrollbars also shouldn't trigger animations.
- bool is_animatable_scrollbar =
- scrollbar_layer->is_overlay_scrollbar() &&
- ((layer_tree_impl()->total_page_scale_factor() >
- layer_tree_impl()->min_page_scale_factor()) ||
- !layer_tree_impl()->settings().use_pinch_zoom_scrollbars);
- if (is_animatable_scrollbar)
- scrollbar_animation_controller_->DidScrollUpdate();
+ if (scrollbar_needs_animation) {
+ layer_tree_impl()->set_needs_update_draw_properties();
+ // TODO(wjmaclean) The scrollbar animator for the pinch-zoom scrollbars
+ // should activate for every scroll on the main frame, not just the
+ // scrolls that move the pinch virtual viewport (i.e. trigger from
+ // either inner or outer viewport).
+ if (scrollbar_animation_controller_) {
+ // When both non-overlay and overlay scrollbars are both present, don't
+ // animate the overlay scrollbars when page scale factor is at the min.
+ // Non-overlay scrollbars also shouldn't trigger animations.
+ bool is_animatable_scrollbar =
+ scrollbar_layer->is_overlay_scrollbar() &&
+ ((layer_tree_impl()->total_page_scale_factor() >
+ layer_tree_impl()->min_page_scale_factor()) ||
+ !layer_tree_impl()->settings().use_pinch_zoom_scrollbars);
+ if (is_animatable_scrollbar)
+ scrollbar_animation_controller_->DidScrollUpdate();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698