| Index: chrome/browser/renderer_host/render_widget_host.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_widget_host.cc (revision 45523)
|
| +++ chrome/browser/renderer_host/render_widget_host.cc (working copy)
|
| @@ -127,6 +127,7 @@
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnMsgPaintAtSizeAck)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnMsgUpdateRect)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_CreateVideo, OnMsgCreateVideo)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateVideo, OnMsgUpdateVideo)
|
| @@ -280,6 +281,14 @@
|
| view_->SetIsLoading(is_loading);
|
| }
|
|
|
| +void RenderWidgetHost::PaintAtSize(TransportDIB::Handle dib_handle,
|
| + const gfx::Size& size) {
|
| + // Ask the renderer to create a bitmap regardless of whether it's
|
| + // hidden, being resized, redrawn, etc., and to scale it by the
|
| + // scale factor given.
|
| + Send(new ViewMsg_PaintAtSize(routing_id_, dib_handle, size));
|
| +}
|
| +
|
| BackingStore* RenderWidgetHost::GetBackingStore(bool force_create) {
|
| // We should not be asked to paint while we are hidden. If we are hidden,
|
| // then it means that our consumer failed to call WasRestored. If we're not
|
| @@ -676,6 +685,13 @@
|
| }
|
| }
|
|
|
| +void RenderWidgetHost::OnMsgPaintAtSizeAck(
|
| + const TransportDIB::Handle& dib_handle, const gfx::Size& size) {
|
| + if (painting_observer_) {
|
| + painting_observer_->WidgetDidReceivePaintAtSizeAck(this, dib_handle, size);
|
| + }
|
| +}
|
| +
|
| void RenderWidgetHost::OnMsgUpdateRect(
|
| const ViewHostMsg_UpdateRect_Params& params) {
|
| TimeTicks paint_start = TimeTicks::Now();
|
|
|