From 353a34ce51417f032198c1c537af4180d8eb9af2 Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Fri, 28 May 2010 23:35:17 +0000 Subject: Enabled mousewheel coalescing to work better for ChromeOS. This was important because the browser process couldn't keep up with the input stream, resulting in poor 2 finger scroll behavior. It's now tuned to the settings in cros. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/2239001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48541 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_widget.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'chrome/renderer/render_widget.cc') diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index ea801c4..e3d5390 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -328,10 +328,17 @@ void RenderWidget::OnHandleInputEvent(const IPC::Message& message) { response->WriteInt(input_event->type); response->WriteBool(processed); - if (input_event->type == WebInputEvent::MouseMove && + if ((input_event->type == WebInputEvent::MouseMove || + input_event->type == WebInputEvent::MouseWheel) && paint_aggregator_.HasPendingUpdate()) { // We want to rate limit the input events in this case, so we'll wait for // painting to finish before ACKing this message. + if (pending_input_event_ack_.get()) { + // As two different kinds of events could cause us to postpone an ack + // we send it now, if we have one pending. The Browser should never + // send us the same kind of event we are delaying the ack for. + Send(pending_input_event_ack_.release()); + } pending_input_event_ack_.reset(response); } else { Send(response); -- cgit v1.1