diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:24:16 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-01 20:24:16 +0000 |
commit | a9e8b391a900c2a28b07a61848c3383bc4c56979 (patch) | |
tree | 05178e0b0ee0b221b1108c8e715a3bfc4945236d /chrome/browser/renderer_host/render_widget_host.h | |
parent | 6aeac834d9b08d597aee48a01a1661b715aac354 (diff) | |
download | chromium_src-a9e8b391a900c2a28b07a61848c3383bc4c56979.zip chromium_src-a9e8b391a900c2a28b07a61848c3383bc4c56979.tar.gz chromium_src-a9e8b391a900c2a28b07a61848c3383bc4c56979.tar.bz2 |
Add ViewMsg_DoneUsingBitmap message.
ViewMsg_UpdateRect_ACK messages sent from the browser to the
renderer currently tell the renderer both that it can start
rendering the next update and that the TransportDIB that it
previously sent to the browser is now available for reuse.
This change adds a new ViewMsg_DoneUsingBitmap message for
communicating the latter piece of information. We currently
always send ViewMsg_DoneUsingBitmap immediately before
sending ViewMsg_UpdateRect_ACK, so no functional changes are
intended from this change.
This is preparatory work for an optimization where we defer
copying updates to the backing store, instead copying them
directly from the TransportDIB to the widget -- if we get
repeated updates for the same region, we can avoid copying
all but the final update to the backing store entirely.
BUG=none
TEST=tried it on GTK; sent to trybots. will do some testing on other platforms too
Review URL: http://codereview.chromium.org/3506007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61225 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 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index 0e5fa4a..91215d6 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -238,9 +238,14 @@ class RenderWidgetHost : public IPC::Channel::Listener, // (for example, if we don't currently have a RenderWidgetHostView.) BackingStore* AllocBackingStore(const gfx::Size& size); - // When a backing store does asynchronous painting, it will call this function - // when it is done with the DIB. We will then forward a message to the - // renderer to send another paint. + // When a backing store is copying a TransportDIB asynchronously, it calls + // this function when it is done using it. We then send a message to the + // renderer letting it know that the bitmap can be reused. + void DoneCopyingBitmapToBackingStore(TransportDIB::Id bitmap); + + // When a backing store does asynchronous painting, it calls this function + // when it is done painting. We then send a message to the renderer to send + // another update. void DonePaintingToBackingStore(); // GPU accelerated version of GetBackingStore function. This will @@ -526,7 +531,8 @@ class RenderWidgetHost : public IPC::Channel::Listener, const gfx::Rect& bitmap_rect, const std::vector<gfx::Rect>& copy_rects, const gfx::Size& view_size, - bool* painted_synchronously); + bool* painted_synchronously, + bool* done_copying_bitmap); // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The // |dib| and its corresponding location |bitmap_rect| in the backing store |