diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 00:55:59 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 00:55:59 +0000 |
commit | 0f83284f36abbc775fe0dae1f0b134bf8b883397 (patch) | |
tree | 5d4aea9e110f0c8e359289eb4fface58c0ff37c3 /chrome/browser/renderer_host/render_widget_host.h | |
parent | a17b674580be4397cf56e2c955fac9f2c4a3bfaa (diff) | |
download | chromium_src-0f83284f36abbc775fe0dae1f0b134bf8b883397.zip chromium_src-0f83284f36abbc775fe0dae1f0b134bf8b883397.tar.gz chromium_src-0f83284f36abbc775fe0dae1f0b134bf8b883397.tar.bz2 |
Optimize the rendering when there are pending key events.
BUG=27932: Regression: Forced rendering for every keystroke
TEST=See the bug report.
Review URL: http://codereview.chromium.org/435002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.h')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index c8ac6d5..fd78eb6 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -447,6 +447,9 @@ class RenderWidgetHost : public IPC::Channel::Listener, const gfx::Rect& clip_rect, const gfx::Size& view_size); + // Called by OnMsgInputEventAck() to process a keyboard event ack message. + void ProcessKeyboardEventAck(int type, bool processed); + // The View associated with the RenderViewHost. The lifetime of this object // is associated with the lifetime of the Render process. If the Renderer // crashes, its View is destroyed and this pointer becomes NULL, even though @@ -577,6 +580,15 @@ class RenderWidgetHost : public IPC::Channel::Listener, // changed. bool suppress_next_char_events_; + // True if the PaintRect_ACK message for the last PaintRect message is still + // not sent yet. This is used for optimizing the painting overhead when there + // are many pending key events in the queue. + bool paint_ack_postponed_; + + // The time when a PaintRect_ACK message is postponed, so that we can send the + // message after a certain duration. + base::TimeTicks paint_ack_postponed_time_; + // During the call to some methods, eg. OnMsgInputEventAck, this // RenderWidgetHost object may be destroyed before executing some code that // still want to access this object. To avoid this situation, |death_flag_| |