summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 18:21:24 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-01 18:21:24 +0000
commit12fbad81e648483365f2197f16bf745e0500249e (patch)
tree19acb1fa2d549e7fea1a8657df9f0a53b1a794c9 /chrome/renderer/render_widget.h
parentd0519a92827a63f4fca5118d3697e118a97a99fd (diff)
downloadchromium_src-12fbad81e648483365f2197f16bf745e0500249e.zip
chromium_src-12fbad81e648483365f2197f16bf745e0500249e.tar.gz
chromium_src-12fbad81e648483365f2197f16bf745e0500249e.tar.bz2
Reduce the size of the paint queue.
(Sheriffs: warning, dangerous patch) On Chronos, with the slower CPU, it appears that page scrolling sigificantly lags the mouse cursor sometimes. Some amount of lag will always happen, but it appears that we are queuing old mouse positions. This patch makes it so that we don't ACK a mouse move event if there is a resulting paint pending. Current we get something like this: Renderer: Browser: <------- HandleInputEvent -------- (handles the event and defers the painting) -------- ACK -------------------> (has a mouse move saved up) ... HandleInputEvent --------- (painting starts) ----------- PaintRect -------------> <----... At this point, we buffered a mouse position while painting. If we don't ACK the event until we have finished painting, we can get a more up-to-date event. This will need careful observation of the perf bots to check that nothing bad happens. http://codereview.chromium.org/173285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.h')
-rw-r--r--chrome/renderer/render_widget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index ae54a55..f8580ce 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -116,7 +116,9 @@ class RenderWidget : public IPC::Channel::Listener,
// must ensure that the given rect fits within the bounds of the WebWidget.
void PaintRect(const gfx::Rect& rect, skia::PlatformCanvas* canvas);
+ void CallDoDeferredPaint();
void DoDeferredPaint();
+ void CallDoDeferredScroll();
void DoDeferredScroll();
void DoDeferredClose();
void DoDeferredSetWindowRect(const WebKit::WebRect& pos);
@@ -308,6 +310,8 @@ class RenderWidget : public IPC::Channel::Listener,
scoped_ptr<ViewHostMsg_ShowPopup_Params> popup_params_;
+ scoped_ptr<IPC::Message> pending_input_event_ack_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};