Chromium Code Reviews| Index: content/renderer/gpu/compositor_output_surface.cc |
| diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc |
| index 21eaf809cf4dd6ad64f1a1fd7958ed085ec52514..91c6c948a73f21a7bb90c7f8540e3e8280c44422 100644 |
| --- a/content/renderer/gpu/compositor_output_surface.cc |
| +++ b/content/renderer/gpu/compositor_output_surface.cc |
| @@ -5,13 +5,16 @@ |
| #include "content/renderer/gpu/compositor_output_surface.h" |
| #include "base/message_loop_proxy.h" |
| +#include "cc/compositor_frame.h" |
| #include "cc/output_surface_client.h" |
| #include "content/common/view_messages.h" |
| #include "content/renderer/render_thread_impl.h" |
| #include "ipc/ipc_forwarding_message_filter.h" |
| #include "ipc/ipc_sync_channel.h" |
| +#include "ipc/ipc_sync_message_filter.h" |
| #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
| +using cc::CompositorFrame; |
| using cc::SoftwareOutputDevice; |
| using WebKit::WebGraphicsContext3D; |
| @@ -88,9 +91,20 @@ cc::SoftwareOutputDevice* CompositorOutputSurface::SoftwareDevice() const { |
| } |
| void CompositorOutputSurface::SendFrameToParentCompositor( |
| - const cc::CompositorFrame&) { |
| + const cc::CompositorFrame& frame) { |
| DCHECK(CalledOnValidThread()); |
| - NOTREACHED(); |
| + switch (frame.type) { |
| + case CompositorFrame::DELEGATED: |
|
piman
2012/12/14 22:02:22
nit: indent according to chrome style (case at +2)
aelias_OOO_until_Jul13
2012/12/15 00:06:17
Done.
|
| + Send(new ViewHostMsg_SwapDelegatedCompositorFrame(routing_id_, |
| + static_cast<const cc::DelegatedCompositorFrame&>(frame))); |
| + break; |
| + case CompositorFrame::GL: |
| + Send(new ViewHostMsg_SwapGLCompositorFrame(routing_id_, |
| + static_cast<const cc::GLCompositorFrame&>(frame))); |
| + break; |
| + default: |
| + NOTREACHED(); |
| + } |
| } |
| void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
| @@ -109,4 +123,8 @@ void CompositorOutputSurface::OnUpdateVSyncParameters( |
| client_->OnVSyncParametersChanged(timebase, interval); |
| } |
| +bool CompositorOutputSurface::Send(IPC::Message* message) { |
| + return ChildThread::current()->sync_message_filter()->Send(message); |
| +} |
| + |
| } // namespace content |