summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 15:52:54 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 15:52:54 +0000
commit9de65c8b3f17f28ff7edebb63f0922f5734bf55b (patch)
tree7ec8c5b258e930a9c1c1682f451fc877f640f780 /chrome/renderer/render_widget.h
parentcd7bc4ed28abcb9a3652d4e3f6ffa2fe9f503aae (diff)
downloadchromium_src-9de65c8b3f17f28ff7edebb63f0922f5734bf55b.zip
chromium_src-9de65c8b3f17f28ff7edebb63f0922f5734bf55b.tar.gz
chromium_src-9de65c8b3f17f28ff7edebb63f0922f5734bf55b.tar.bz2
Revert 34951 - Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.
The combined IPC means that scrolling only requires one transport DIB instead of two. Previously, we'd use one in the ScrollRect IPC to pass up the pixels for the exposed region, and then we'd use a second one in the PaintRect IPC to pass up the pixels for the updated scroll bar rendering. Now all paints are done using a single transport DIB. Optimize RenderWidgetHostViewWin::OnPaint to only paint the damaged regions. This means calling GetUpdateRgn and GetRegionData to enumerate the list of damage rects. Then only those rects are copied from the backing store. The same optimization is not done for Linux or Mac yet. R=brettw BUG=29591 TEST=none Review URL: http://codereview.chromium.org/506013 TBR=darin@chromium.org Review URL: http://codereview.chromium.org/506075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.h')
-rw-r--r--chrome/renderer/render_widget.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 4cf033e..c25c99a 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -142,7 +142,8 @@ class RenderWidget : public IPC::Channel::Listener,
const gfx::Rect& resizer_rect);
void OnWasHidden();
void OnWasRestored(bool needs_repainting);
- void OnUpdateRectAck();
+ void OnPaintRectAck();
+ void OnScrollRectAck();
void OnRequestMoveAck();
void OnHandleInputEvent(const IPC::Message& message);
void OnMouseCaptureLost();
@@ -166,9 +167,14 @@ class RenderWidget : public IPC::Channel::Listener,
bool is_hidden() const { return is_hidden_; }
- // True if an UpdateRect_ACK message is pending.
- bool update_reply_pending() const {
- return update_reply_pending_;
+ // True if a PaintRect_ACK message is pending.
+ bool paint_reply_pending() const {
+ return paint_reply_pending_;
+ }
+
+ // True if a ScrollRect_ACK message is pending.
+ bool scroll_reply_pending() const {
+ return current_scroll_buf_ != NULL;
}
bool next_paint_is_resize_ack() const;
@@ -232,20 +238,22 @@ class RenderWidget : public IPC::Channel::Listener,
// The size of the RenderWidget.
gfx::Size size_;
- // The TransportDIB that is being used to transfer an image to the browser.
+ // Transport DIBs that are currently in use to transfer an image to the
+ // browser.
TransportDIB* current_paint_buf_;
+ TransportDIB* current_scroll_buf_;
PaintAggregator paint_aggregator_;
// The area that must be reserved for drawing the resize corner.
gfx::Rect resizer_rect_;
- // Flags for the next ViewHostMsg_UpdateRect message.
+ // Flags for the next ViewHostMsg_PaintRect message.
int next_paint_flags_;
- // True if we are expecting an UpdateRect_ACK message (i.e., that a
- // UpdateRect message has been sent).
- bool update_reply_pending_;
+ // True if we are expecting a PaintRect_ACK message (i.e., that a PaintRect
+ // message has been sent).
+ bool paint_reply_pending_;
// Set to true if we should ignore RenderWidget::Show calls.
bool did_show_;