Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc

Issue 1645873002: Use ParamTraits for media::BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_video_decode_accelerator_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
index 846bd531c447bd8ccbbb6db889ca1ca7989e5fbe..722a68001dc5a48682bb5f84dd00f967ff88b82c 100644
--- a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
@@ -152,12 +152,15 @@ void GpuJpegDecodeAcceleratorHost::Decode(
DCHECK(
base::SharedMemory::IsHandleValid(video_frame->shared_memory_handle()));
+ AcceleratedJpegDecoderMsg_Decode_Params decode_params;
+ decode_params.input_buffer = bitstream_buffer;
base::SharedMemoryHandle input_handle =
channel_->ShareToGpuProcess(bitstream_buffer.handle());
if (!base::SharedMemory::IsHandleValid(input_handle)) {
DLOG(ERROR) << "Failed to duplicate handle of BitstreamBuffer";
return;
}
+ decode_params.input_buffer.set_handle(input_handle);
base::SharedMemoryHandle output_handle =
channel_->ShareToGpuProcess(video_frame->shared_memory_handle());
if (!base::SharedMemory::IsHandleValid(output_handle)) {
@@ -176,11 +179,7 @@ void GpuJpegDecodeAcceleratorHost::Decode(
size_t output_buffer_size = media::VideoFrame::AllocationSize(
video_frame->format(), video_frame->coded_size());
- AcceleratedJpegDecoderMsg_Decode_Params decode_params;
decode_params.coded_size = video_frame->coded_size();
- decode_params.input_buffer_id = bitstream_buffer.id();
- decode_params.input_buffer_handle = input_handle;
- decode_params.input_buffer_size = bitstream_buffer.size();
decode_params.output_video_frame_handle = output_handle;
decode_params.output_buffer_size = output_buffer_size;
Send(new AcceleratedJpegDecoderMsg_Decode(decoder_route_id_, decode_params));
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_video_decode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698