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

Unified Diff: content/renderer/render_widget.cc

Issue 8820001: Send the pending input event ack before the UpdateRect message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged past antoine's updaterect change Created 9 years 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index d250885114f31b761821534b09f4384ac7a02e2d..490b8a25545fa7a99d533a90672e3c291827072d 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -481,8 +481,11 @@ void RenderWidget::OnHandleInputEvent(const IPC::Message& message) {
bool prevent_default = false;
if (WebInputEvent::isMouseEventType(input_event->type)) {
- prevent_default = WillHandleMouseEvent(
- *(static_cast<const WebMouseEvent*>(input_event)));
+ const WebMouseEvent& mouse_event =
+ *static_cast<const WebMouseEvent*>(input_event);
+ TRACE_EVENT2("renderer", "HandleMouseMove",
+ "x", mouse_event.x, "y", mouse_event.y);
+ prevent_default = WillHandleMouseEvent(mouse_event);
}
bool processed = prevent_default;
@@ -879,6 +882,13 @@ void RenderWidget::DoDeferredUpdate() {
webwidget_->composite(false);
}
+ // If we're holding a pending input event ACK, send the ACK before sending the
+ // UpdateReply message so we can receive another input event before the
+ // UpdateRect_ACK on platforms where the UpdateRect_ACK is sent from within
+ // the UpdateRect IPC message handler.
+ if (pending_input_event_ack_.get())
+ Send(pending_input_event_ack_.release());
+
// If composite() called SwapBuffers, pending_update_params_ will be reset (in
// OnSwapBuffersPosted), meaning a message has been added to the
// updates_pending_swap_ queue, that will be sent later. Otherwise, we send
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698