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

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

Issue 2007413002: [POC; Not for Review] Don't use PostTask queueing between compositor and main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve mouse move by making it non blocking Created 4 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: content/renderer/input/input_event_filter.cc
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index 109b4fe9ed029a4d005d4e0bbe96ff5ef64993ea..c0f59a16efa807504c42ebcdaa51dad482cee356 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -71,7 +71,8 @@ void InputEventFilter::SetIsFlingingInMainThreadEventQueue(int routing_id,
void InputEventFilter::DidAddInputHandler(int routing_id) {
base::AutoLock locked(routes_lock_);
routes_.insert(routing_id);
- route_queues_[routing_id].reset(new MainThreadEventQueue(routing_id, this));
+ route_queues_[routing_id].reset(new MainThreadEventQueue(
+ routing_id, this, main_listener_, main_task_runner_));
}
void InputEventFilter::DidRemoveInputHandler(int routing_id) {
@@ -229,7 +230,7 @@ void InputEventFilter::SendMessageOnIOThread(
sender_->Send(message.release());
}
-void InputEventFilter::SendEventToMainThread(
+void InputEventFilter::HandleEventOnMainThread(
int routing_id,
const blink::WebInputEvent* event,
const ui::LatencyInfo& latency_info,
@@ -237,9 +238,11 @@ void InputEventFilter::SendEventToMainThread(
TRACE_EVENT_INSTANT0(
"input", "InputEventFilter::ForwardToHandler::SendEventToMainThread",
TRACE_EVENT_SCOPE_THREAD);
+
IPC::Message new_msg =
InputMsg_HandleInputEvent(routing_id, event, latency_info, dispatch_type);
- main_task_runner_->PostTask(FROM_HERE, base::Bind(main_listener_, new_msg));
Sami 2016/05/31 16:49:34 Some of the logic in the renderer scheduler looks
dtapuska 2016/06/01 18:22:53 We still are posting tasks; it just occurs at a di
+
+ main_listener_.Run(new_msg);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698