Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index 62fd6edbc99ef68534bfecfeb75d4304dbe6059d..8f59bf83caa0f7e567d8d821d02b54cbb12d41f7 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -312,6 +312,8 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { |
OnMsgDidActivateAcceleratedCompositing) |
IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnMsgLockMouse) |
IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnMsgUnlockMouse) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SwapCompositorFrame, |
+ OnMsgSwapCompositorFrame) |
#if defined(OS_POSIX) || defined(USE_AURA) |
IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnMsgGetWindowRect) |
IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnMsgGetRootWindowRect) |
@@ -1764,6 +1766,22 @@ void RenderWidgetHostImpl::OnMsgUnlockMouse() { |
RejectMouseLockOrUnlockIfNecessary(); |
} |
+void RenderWidgetHostImpl::OnMsgSwapCompositorFrame( |
+ const cc::CompositorFrame& frame) { |
+ if (!view_) { |
+ cc::CompositorFrameAck ack; |
+ ack.resources = frame.resources; |
+ SwapCompositorFrameAck(ack); |
+ return; |
+ } |
+ view_->SwapCompositorFrame(frame); |
+} |
+ |
+void RenderWidgetHostImpl::SwapCompositorFrameAck( |
+ const cc::CompositorFrameAck& ack) { |
+ Send(new ViewMsg_SwapCompositorFrameACK(routing_id_, ack)); |
+} |
+ |
#if defined(OS_POSIX) || defined(USE_AURA) |
void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id, |
gfx::Rect* results) { |