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

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

Issue 2841263002: [VSync Queue] Flush input in CommitComplete() (Closed)
Patch Set: Test Patch: VsyncAlignedInput Enabled Created 3 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
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 911147a1f3711d6f2c3194c06dbe65a532754199..ab90172c31bc3f7eed77bfdbc32af1c9fd182ef4 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -325,6 +325,14 @@ void InputHandlerProxy::HandleInputEventWithLatencyInfo(
bool needs_animate_input = compositor_event_queue_->empty();
compositor_event_queue_->Queue(std::move(event_with_callback),
tick_clock_->NowTicks());
+
+ if (input_handler_->GetInputHandlerState() ==
+ cc::InputHandler::InputHandlerState::IDLE) {
+ // Dispatch immediately to avoid checkerboard in high latency mode.
+ DispatchQueuedInputEvents();
+ return;
+ }
+
if (needs_animate_input)
input_handler_->SetNeedsAnimateInput();
return;

Powered by Google App Engine
This is Rietveld 408576698