Index: content/common/gpu/client/gpu_video_decode_accelerator_host.cc |
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc |
index 19a336b9ca30af573159449f4eef9911b2b01b8d..15b514a2b5e7ace52f2aa26da758111845488541 100644 |
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc |
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc |
@@ -119,24 +119,16 @@ void GpuVideoDecodeAcceleratorHost::Decode( |
DCHECK(CalledOnValidThread()); |
if (!channel_) |
return; |
- |
- base::SharedMemoryHandle handle = channel_->ShareToGpuProcess( |
- bitstream_buffer.handle()); |
+ media::BitstreamBuffer buffer_to_send = bitstream_buffer; |
+ base::SharedMemoryHandle handle = |
dcheng
2016/02/18 21:06:09
I think the IPC subsystem has been improved so you
erikchen
2016/02/18 21:07:31
correct. no need to dupe shared memory handles bef
Owen Lin
2016/02/23 03:40:11
Thanks. That's great. But I think we should do tha
|
+ channel_->ShareToGpuProcess(bitstream_buffer.handle()); |
if (!base::SharedMemory::IsHandleValid(handle)) { |
NOTREACHED() << "Failed to duplicate buffer handler"; |
return; |
} |
- |
- AcceleratedVideoDecoderMsg_Decode_Params params; |
- params.bitstream_buffer_id = bitstream_buffer.id(); |
- params.buffer_handle = handle; |
- params.size = bitstream_buffer.size(); |
- params.presentation_timestamp = bitstream_buffer.presentation_timestamp(); |
- params.key_id = bitstream_buffer.key_id(); |
- params.iv = bitstream_buffer.iv(); |
- params.subsamples = bitstream_buffer.subsamples(); |
- |
- Send(new AcceleratedVideoDecoderMsg_Decode(decoder_route_id_, params)); |
+ buffer_to_send.set_handle(handle); |
+ Send( |
+ new AcceleratedVideoDecoderMsg_Decode(decoder_route_id_, buffer_to_send)); |
} |
void GpuVideoDecodeAcceleratorHost::AssignPictureBuffers( |