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

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

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: dtapuska's comment: Use ack to determine blocking vs. non-blocking Created 3 years, 7 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 1ed598061c2dca8f038386555d8b46bf85c0df09..d7536f58465fa9cefd1456b04b1ea80e94b5d461 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -322,6 +322,17 @@ void InputHandlerProxy::HandleInputEventWithLatencyInfo(
}
if (has_ongoing_compositor_scroll_fling_pinch_) {
+ const auto& gesture_event = ToWebGestureEvent(event_with_callback->event());
+ if (gesture_event.source_device == blink::kWebGestureDeviceTouchscreen &&
+ gesture_event.source_touch_event_dispatch_type ==
+ WebInputEvent::kBlocking) {
+ // Dispatch immediately to reduce latency.
+ compositor_event_queue_->Queue(std::move(event_with_callback),
+ tick_clock_->NowTicks());
+ DispatchQueuedInputEvents();
+ return;
+ }
+
bool needs_animate_input = compositor_event_queue_->empty();
compositor_event_queue_->Queue(std::move(event_with_callback),
tick_clock_->NowTicks());

Powered by Google App Engine
This is Rietveld 408576698