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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 230223006: Move nonscrollable axis gloweffect suppression to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 685cfb99122f393eec5b610e90c35c8c51ed546d..f60df2c535024ce98feb1997dee9a6fdd5ab832b 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2367,6 +2367,24 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
if (did_scroll_y)
accumulated_root_overscroll_.set_y(0);
+ if (!settings_.using_synchronous_renderer_compositor) {
jdduke (slow) 2014/04/09 17:35:00 I don't think we want to piggyback on this setting
aelias_OOO_until_Jul13 2014/04/09 19:43:43 "report_overscroll_only_for_scrollable_axes" sound
+ gfx::SizeF ceiled_viewport_size =
+ gfx::ToCeiledSize(active_tree_->ScrollableViewportSize());
+ gfx::SizeF root_layer_size = active_tree_->ScrollableSize();
+ if (!(ceiled_viewport_size.width() < root_layer_size.width())) {
+ // Horizontal Glow Disabled as scrolling on Horizontal axes is impossible.
jdduke (slow) 2014/04/09 17:35:00 I wonder if we should just use: if (InnerViewport
aelias_OOO_until_Jul13 2014/04/09 19:43:43 This sounds fine. If MaxScrollOffset suffers from
+ if ((unused_root_delta.x() != 0 && unused_root_delta.y() == 0 &&
+ !did_scroll_x))
+ return did_scroll_content || did_scroll_top_controls;
+ }
+ if (!(ceiled_viewport_size.height() < root_layer_size.height())) {
+ // Vertical Glow Disabled as scrolling on Horizontal axes is impossible.
+ if ((unused_root_delta.x() == 0 && unused_root_delta.y() != 0 &&
+ !did_scroll_y))
+ return did_scroll_content || did_scroll_top_controls;
+ }
+ }
+
accumulated_root_overscroll_ += unused_root_delta;
bool did_overscroll = !unused_root_delta.IsZero();
if (did_overscroll && input_handler_client_) {
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698