Index: content/common/gpu/gpu_command_buffer_stub.cc |
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
index 7a544eb1fbf2ec0fbada8414c2dc6e80ca6a8508..9bf97927aee746774aee6584a113978f563da961 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -20,6 +20,7 @@ |
#include "content/common/gpu/gpu_watchdog.h" |
#include "content/common/gpu/image_transport_surface.h" |
#include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
+#include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
#include "content/common/gpu/sync_point_manager.h" |
#include "content/public/common/content_client.h" |
#include "gpu/command_buffer/common/constants.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_CreateVideoEncoder, |
+ OnCreateVideoEncoder) |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible, |
OnSetSurfaceVisible) |
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint, |
@@ -749,7 +752,7 @@ void GpuCommandBufferStub::OnCreateVideoDecoder( |
media::VideoCodecProfile profile, |
IPC::Message* reply_message) { |
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoDecoder"); |
- int decoder_route_id = channel_->GenerateRouteID(); |
+ int32 decoder_route_id = channel_->GenerateRouteID(); |
GpuVideoDecodeAccelerator* decoder = new GpuVideoDecodeAccelerator( |
decoder_route_id, this, channel_->io_message_loop()); |
decoder->Initialize(profile, reply_message); |
Ami GONE FROM CHROMIUM
2014/03/17 03:17:54
It is at best suspicious that the return value is
sheu
2014/03/18 22:38:35
Aha! Note that GpuVideoDecodeAccelerator _doesn't
Ami GONE FROM CHROMIUM
2014/03/18 23:53:19
lolnice
|
@@ -757,6 +760,25 @@ void GpuCommandBufferStub::OnCreateVideoDecoder( |
// self-delete during destruction of this stub. |
} |
+void GpuCommandBufferStub::OnCreateVideoEncoder( |
+ media::VideoFrame::Format input_format, |
+ const gfx::Size& input_visible_size, |
+ media::VideoCodecProfile output_profile, |
+ uint32 initial_bitrate, |
+ IPC::Message* reply_message) { |
+ TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoEncoder"); |
+ int32 encoder_route_id = channel_->GenerateRouteID(); |
+ GpuVideoEncodeAccelerator* encoder = |
+ new GpuVideoEncodeAccelerator(encoder_route_id, this); |
+ encoder->Initialize(input_format, |
Ami GONE FROM CHROMIUM
2014/03/17 03:17:54
ditto
(should the interfaces use WARN_UNUSED_RESU
sheu
2014/03/18 22:38:35
See above.
|
+ input_visible_size, |
+ output_profile, |
+ initial_bitrate, |
+ reply_message); |
+ // encoder is registered as a DestructionObserver of this stub and will |
+ // self-delete during destruction of this stub. |
+} |
+ |
void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) { |
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible"); |
if (memory_manager_client_state_) |