Index: content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
index 11ff91a9d6cf18986406eb57660aaa79fdfb4514..962f431873e1c5e42694bf2846e1894c8a3157db 100644 |
--- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
+++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc |
@@ -73,12 +73,11 @@ static unsigned int VaSurfaceFormatForJpeg( |
VaapiJpegDecodeAccelerator::DecodeRequest::DecodeRequest( |
const media::BitstreamBuffer& bitstream_buffer, |
- scoped_ptr<base::SharedMemory> shm, |
+ scoped_ptr<SharedMemoryRegion> shm, |
const scoped_refptr<media::VideoFrame>& video_frame) |
: bitstream_buffer(bitstream_buffer), |
shm(shm.Pass()), |
- video_frame(video_frame) { |
-} |
+ video_frame(video_frame) {} |
VaapiJpegDecodeAccelerator::DecodeRequest::~DecodeRequest() { |
} |
@@ -286,10 +285,10 @@ void VaapiJpegDecodeAccelerator::Decode( |
DVLOG(4) << "Mapping new input buffer id: " << bitstream_buffer.id() |
<< " size: " << bitstream_buffer.size(); |
- scoped_ptr<base::SharedMemory> shm( |
- new base::SharedMemory(bitstream_buffer.handle(), true)); |
+ scoped_ptr<SharedMemoryRegion> shm( |
+ new SharedMemoryRegion(bitstream_buffer, true)); |
- if (!shm->Map(bitstream_buffer.size())) { |
+ if (!shm->Map()) { |
LOG(ERROR) << "Failed to map input buffer"; |
NotifyErrorFromDecoderThread(bitstream_buffer.id(), UNREADABLE_INPUT); |
return; |