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

Unified Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 536059: Mac: Coalesce scroll events. (Closed)
Patch Set: test Created 10 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host.h
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index ddda0024e7919db2442afd90d003467f6e2afcb9..c99946234d8689aa126006951a611d23f1683cc1 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -511,6 +511,21 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// is true).
scoped_ptr<WebKit::WebMouseEvent> next_mouse_move_;
+ // (Similar to |mouse_move_pending_|.) True if a mouse wheel event was sent
+ // and we are waiting for a corresponding ack.
+ bool mouse_wheel_pending_;
+
+ typedef std::deque<WebKit::WebMouseWheelEvent> WheelEventQueue;
+
+ // (Similar to |next_mouse_move_|.) The next mouse wheel events to send.
+ // Unlike mouse moves, mouse wheel events received while one is pending are
+ // coalesced (by accumulating deltas) if they match the previous event in
+ // modifiers. On the Mac, in particular, mouse wheel events are received at a
+ // high rate; not waiting for the ack results in jankiness, and using the same
+ // mechanism as for mouse moves (just dropping old events when multiple ones
+ // would be queued) results in very slow scrolling.
+ WheelEventQueue coalesced_mouse_wheel_events_;
+
// The time when an input event was sent to the RenderWidget.
base::TimeTicks input_event_start_time_;
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698