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

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

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle the offset with a helper class Created 5 years 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
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 647010170012f2cc9e9aa0d93f8a2084ac909730..aad15046170d59430b2e8a0c242eba2f61fad6d0 100644
--- a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
@@ -175,9 +175,13 @@ void GpuJpegDecodeAcceleratorHost::Decode(
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.input_buffer_size =
+ base::checked_cast<uint32>(bitstream_buffer.size());
+ decode_params.input_buffer_offset =
+ base::checked_cast<uint32>(bitstream_buffer.offset());
decode_params.output_video_frame_handle = output_handle;
- decode_params.output_buffer_size = output_buffer_size;
+ decode_params.output_buffer_size =
+ base::checked_cast<uint32>(output_buffer_size);
Send(new AcceleratedJpegDecoderMsg_Decode(decoder_route_id_, decode_params));
}

Powered by Google App Engine
This is Rietveld 408576698