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

Unified Diff: content/renderer/input/render_widget_input_handler.cc

Issue 1780953003: Change the non-blocking event queue to the main thread event queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_regression_5
Patch Set: Force ack in renderer to be solely based on the DispatchEventType Created 4 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
Index: content/renderer/input/render_widget_input_handler.cc
diff --git a/content/renderer/input/render_widget_input_handler.cc b/content/renderer/input/render_widget_input_handler.cc
index 6a0a652a335b31889ffe318323b2789e66718a7b..6694a71583e26d2a15bf3039db7bcd53461922a2 100644
--- a/content/renderer/input/render_widget_input_handler.cc
+++ b/content/renderer/input/render_widget_input_handler.cc
@@ -306,6 +306,8 @@ void RenderWidgetInputHandler::HandleInputEvent(
}
bool non_blocking =
+ dispatch_type ==
+ InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN ||
dispatch_type == InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING;
// TODO(dtapuska): Use the input_event.timeStampSeconds as the start
// ideally this should be when the event was sent by the compositor to the
@@ -399,12 +401,16 @@ void RenderWidgetInputHandler::HandleInputEvent(
// by reentrant calls for events after the paused one.
bool no_ack = ignore_ack_for_mouse_move_from_debugger_ &&
input_event.type == WebInputEvent::MouseMove;
tdresser 2016/03/15 13:41:22 Could we invert |no_ack| while we're here?
dtapuska 2016/03/15 19:46:05 Done.
- if (non_blocking) {
+ if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN ||
+ dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) {
// |non_blocking| means it was ack'd already by the InputHandlerProxy
// so let the delegate know the event has been handled.
- delegate_->NonBlockingInputEventHandled(input_event.type);
- } else if (WebInputEventTraits::WillReceiveAckFromRenderer(input_event) &&
- !no_ack) {
+ delegate_->NotifyInputEventHandled(input_event.type);
+ }
+
+ if ((dispatch_type == DISPATCH_TYPE_BLOCKING ||
+ dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) &&
+ !no_ack) {
scoped_ptr<InputEventAck> response(new InputEventAck(
input_event.type, ack_result, swap_latency_info,
std::move(event_overscroll),

Powered by Google App Engine
This is Rietveld 408576698