diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-08-30 15:14:49 +0100 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-08-30 15:14:49 +0100 |
commit | 424c4d7b64af9d0d8fd9624f381f469654d5e3d2 (patch) | |
tree | af8b16dc2ba7fc8c8bb1c9fa18b907c847f3883d /content/common/gpu/gpu_command_buffer_stub.cc | |
parent | c70ef2906f891fe7d218980660e4cda465717916 (diff) | |
download | chromium_org-424c4d7b64af9d0d8fd9624f381f469654d5e3d2.tar.gz |
Merge from Chromium at DEPS revision r220549
This commit was generated by merge_to_master.py.
Change-Id: I8fcb82db764ec1eb0294280936c177bd9ba8a9e9
Diffstat (limited to 'content/common/gpu/gpu_command_buffer_stub.cc')
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 78c0a49aca..b5ee308f9d 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -18,6 +18,7 @@ #include "content/common/gpu/gpu_messages.h" #include "content/common/gpu/gpu_watchdog.h" #include "content/common/gpu/image_transport_surface.h" +#include "content/common/gpu/media/gl_surface_capturer.h" #include "content/common/gpu/media/gpu_video_decode_accelerator.h" #include "content/common/gpu/sync_point_manager.h" #include "content/public/common/content_client.h" @@ -206,6 +207,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) { OnGetTransferBuffer); IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, OnCreateVideoDecoder) + IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateSurfaceCapturer, + OnCreateSurfaceCapturer) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, OnSetSurfaceVisible) IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DiscardBackbuffer, @@ -722,11 +725,23 @@ void GpuCommandBufferStub::OnCreateVideoDecoder( int decoder_route_id = channel_->GenerateRouteID(); GpuVideoDecodeAccelerator* decoder = new GpuVideoDecodeAccelerator(decoder_route_id, this); - decoder->Initialize(profile, reply_message); + decoder->Initialize(profile, reply_message, channel_->io_message_loop()); // decoder is registered as a DestructionObserver of this stub and will // self-delete during destruction of this stub. } +void GpuCommandBufferStub::OnCreateSurfaceCapturer( + IPC::Message* reply_message) { + TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateSurfaceCapturer"); + int capturer_route_id = channel_->GenerateRouteID(); + new GLSurfaceCapturer(capturer_route_id, this); + // The capturer is registered as a DestructionObserver of this stub and will + // self-delete during destruction of this stub. + GpuCommandBufferMsg_CreateSurfaceCapturer::WriteReplyParams( + reply_message, capturer_route_id); + Send(reply_message); +} + void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); if (memory_manager_client_state_) |