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

Unified Diff: cc/layers/layer_impl.cc

Issue 571873003: [Android]Optimization of scrollbar animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding test case for above patch 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 | cc/layers/scrollbar_layer_impl_base.h » ('j') | cc/layers/scrollbar_layer_impl_base.h » ('J')
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 5b39eb0e36262c2299be2fd73522def8ab8c897c..a7569675060739584fa3506d1ad410d048a14f8c 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1274,7 +1274,7 @@ void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
scroll_rect.Scale(layer_tree_impl()->total_page_scale_factor());
current_offset.Scale(layer_tree_impl()->total_page_scale_factor());
}
-
+ scrollbar_layer->ResetScrollbarNeedsAnimation();
scrollbar_layer->SetVerticalAdjust(scrollbar_clip_layer->bounds_delta().y());
if (scrollbar_layer->orientation() == HORIZONTAL) {
float visible_ratio = clip_rect.width() / scroll_rect.width();
@@ -1299,6 +1299,7 @@ void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
// Non-overlay scrollbars also shouldn't trigger animations.
bool is_animatable_scrollbar =
scrollbar_layer->is_overlay_scrollbar() &&
+ scrollbar_layer->scrollbar_needs_animation() &&
danakj 2014/09/19 23:01:35 remove this here, it's not part of |is_animatable_
((layer_tree_impl()->total_page_scale_factor() >
layer_tree_impl()->min_page_scale_factor()) ||
!layer_tree_impl()->settings().use_pinch_zoom_scrollbars);
« no previous file with comments | « no previous file | cc/layers/scrollbar_layer_impl_base.h » ('j') | cc/layers/scrollbar_layer_impl_base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698