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

Unified Diff: ui/events/blink/input_handler_proxy.cc

Issue 2040543002: Take MT jank into account when animating the scroll offset on CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix constant Created 4 years, 6 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
Index: ui/events/blink/input_handler_proxy.cc
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc
index 9b13d93cd2496cb88dec75fdb796d236368319a6..317ff7dcace97f5da0a98ec75945fd459cfbec3b 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -275,12 +275,14 @@ InputHandlerProxy::HandleInputEventWithLatencyInfo(
std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor =
input_handler_->CreateLatencyInfoSwapPromiseMonitor(latency_info);
- InputHandlerProxy::EventDisposition disposition = HandleInputEvent(event);
+ InputHandlerProxy::EventDisposition disposition =
+ HandleInputEvent(event, latency_info);
return disposition;
}
InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
- const WebInputEvent& event) {
+ const WebInputEvent& event,
+ ui::LatencyInfo* latency_info) {
DCHECK(input_handler_);
if (FilterInputEventForFlingBoosting(event))
@@ -296,7 +298,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
case WebInputEvent::GestureScrollUpdate:
return HandleGestureScrollUpdate(
- static_cast<const WebGestureEvent&>(event));
+ static_cast<const WebGestureEvent&>(event), latency_info);
case WebInputEvent::GestureScrollEnd:
return HandleGestureScrollEnd(static_cast<const WebGestureEvent&>(event));
@@ -496,7 +498,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::ScrollByMouseWheel(
} else if (ShouldAnimate(wheel_event.hasPreciseScrollingDeltas)) {
cc::InputHandler::ScrollStatus scroll_status =
input_handler_->ScrollAnimated(gfx::Point(wheel_event.x, wheel_event.y),
- scroll_delta);
+ scroll_delta, nullptr);
RecordMainThreadScrollingReasons(
blink::WebGestureDeviceTouchpad,
@@ -643,7 +645,8 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollBegin(
InputHandlerProxy::EventDisposition
InputHandlerProxy::HandleGestureScrollUpdate(
- const WebGestureEvent& gesture_event) {
+ const WebGestureEvent& gesture_event,
+ ui::LatencyInfo* latency_info) {
#ifndef NDEBUG
DCHECK(expect_scroll_update_end_);
#endif
@@ -657,7 +660,9 @@ InputHandlerProxy::HandleGestureScrollUpdate(
if (ShouldAnimate(gesture_event.data.scrollUpdate.deltaUnits !=
blink::WebGestureEvent::ScrollUnits::Pixels)) {
- switch (input_handler_->ScrollAnimated(scroll_point, scroll_delta).thread) {
+ switch (
+ input_handler_->ScrollAnimated(scroll_point, scroll_delta, latency_info)
+ .thread) {
case cc::InputHandler::SCROLL_ON_IMPL_THREAD:
return DID_HANDLE;
case cc::InputHandler::SCROLL_IGNORED:
« cc/animation/scroll_offset_animation_curve.cc ('K') | « ui/events/blink/input_handler_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698