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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 213743004: Revert of Early terminate flings when scrolling impossible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.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 928f7a7fd478a6527cf6b4ef56214e0ded9eaa15..072e8e7efbf2d6ae30186f8514e2d47b790961b8 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2317,8 +2317,11 @@
accumulated_root_overscroll_ += unused_root_delta;
bool did_overscroll = !unused_root_delta.IsZero();
if (did_overscroll && input_handler_client_) {
- input_handler_client_->DidOverscroll(accumulated_root_overscroll_,
- unused_root_delta);
+ DidOverscrollParams params;
+ params.accumulated_overscroll = accumulated_root_overscroll_;
+ params.latest_overscroll_delta = unused_root_delta;
+ params.current_fling_velocity = current_fling_velocity_;
+ input_handler_client_->DidOverscroll(params);
}
return did_scroll_content || did_scroll_top_controls;
@@ -2381,6 +2384,7 @@
active_tree_->ClearCurrentlyScrollingLayer();
did_lock_scrolling_layer_ = false;
accumulated_root_overscroll_ = gfx::Vector2dF();
+ current_fling_velocity_ = gfx::Vector2dF();
}
void LayerTreeHostImpl::ScrollEnd() {
@@ -2409,6 +2413,11 @@
}
return ScrollStarted;
+}
+
+void LayerTreeHostImpl::NotifyCurrentFlingVelocity(
+ const gfx::Vector2dF& velocity) {
+ current_fling_velocity_ = velocity;
}
float LayerTreeHostImpl::DeviceSpaceDistanceToLayer(
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698