Index: content/browser/frame_host/cross_process_frame_connector.cc |
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc |
index b9f66ac7599a30538dec68da57fd41954b871f2c..45b94e6bd0c4ac27fb5fb2865a7176a5247284cd 100644 |
--- a/content/browser/frame_host/cross_process_frame_connector.cc |
+++ b/content/browser/frame_host/cross_process_frame_connector.cc |
@@ -4,6 +4,8 @@ |
#include "content/browser/frame_host/cross_process_frame_connector.h" |
+#include "cc/surfaces/surface.h" |
+#include "cc/surfaces/surface_manager.h" |
#include "content/browser/frame_host/render_frame_proxy_host.h" |
#include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
#include "content/browser/renderer_host/render_view_host_impl.h" |
@@ -37,6 +39,8 @@ bool CrossProcessFrameConnector::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(FrameHostMsg_ForwardInputEvent, OnForwardInputEvent) |
IPC_MESSAGE_HANDLER(FrameHostMsg_InitializeChildFrame, |
OnInitializeChildFrame) |
+ IPC_MESSAGE_HANDLER(FrameHostMsg_SatisfySequence, OnSatisfySequence) |
+ IPC_MESSAGE_HANDLER(FrameHostMsg_RequireSequence, OnRequireSequence) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -78,6 +82,42 @@ void CrossProcessFrameConnector::ChildFrameCompositorFrameSwapped( |
frame_proxy_in_parent_renderer_->GetRoutingID(), params)); |
} |
+void CrossProcessFrameConnector::SetChildFrameSurface( |
+ cc::SurfaceId& surface_id, |
+ gfx::Size frame_size, |
+ float scale_factor, |
+ cc::SurfaceSequence& sequence) { |
+ frame_proxy_in_parent_renderer_->Send(new FrameMsg_SetChildFrameSurface( |
+ frame_proxy_in_parent_renderer_->GetRoutingID(), surface_id, frame_size, |
+ scale_factor, sequence)); |
+} |
+ |
+void CrossProcessFrameConnector::OnSatisfySequence( |
+ const cc::SurfaceSequence& sequence) { |
+#if !defined(OS_ANDROID) |
+ std::vector<uint32_t> sequences; |
+ sequences.push_back(sequence.sequence); |
+ cc::SurfaceManager* manager = |
+ ImageTransportFactory::GetInstance()->GetSurfaceManager(); |
+ manager->DidSatisfySequences(sequence.id_namespace, &sequences); |
+#endif |
+} |
+ |
+void CrossProcessFrameConnector::OnRequireSequence( |
+ const cc::SurfaceId& id, |
+ const cc::SurfaceSequence& sequence) { |
+#if !defined(OS_ANDROID) |
+ cc::SurfaceManager* manager = |
+ ImageTransportFactory::GetInstance()->GetSurfaceManager(); |
+ cc::Surface* surface = manager->GetSurfaceForId(id); |
+ if (!surface) { |
+ LOG(ERROR) << "Attempting to require callback on nonexistent surface"; |
+ return; |
+ } |
+ surface->AddDestructionDependency(sequence); |
+#endif |
+} |
+ |
void CrossProcessFrameConnector::OnCompositorFrameSwappedACK( |
const FrameHostMsg_CompositorFrameSwappedACK_Params& params) { |
RenderWidgetHostImpl::SendSwapCompositorFrameAck(params.producing_route_id, |