Index: media/gpu/vaapi_video_decode_accelerator.cc |
diff --git a/media/gpu/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi_video_decode_accelerator.cc |
index f5cd0b2a6d701c573c43461ebe67b65ae113743f..cbf1796db167891402ee265e68414fc4f76f3b61 100644 |
--- a/media/gpu/vaapi_video_decode_accelerator.cc |
+++ b/media/gpu/vaapi_video_decode_accelerator.cc |
@@ -637,18 +637,6 @@ |
TryFinishSurfaceSetChange(); |
} |
-static VideoPixelFormat BufferFormatToVideoPixelFormat( |
- gfx::BufferFormat format) { |
- switch (format) { |
- case gfx::BufferFormat::BGRA_8888: |
- return PIXEL_FORMAT_ARGB; |
- |
- default: |
- LOG(FATAL) << "Add more cases as needed"; |
- return PIXEL_FORMAT_UNKNOWN; |
- } |
-} |
- |
void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() { |
DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
@@ -688,12 +676,10 @@ |
DVLOG(1) << "Requesting " << requested_num_pics_ |
<< " pictures of size: " << requested_pic_size_.ToString(); |
- VideoPixelFormat format = |
- BufferFormatToVideoPixelFormat(kOutputPictureFormat); |
message_loop_->PostTask( |
- FROM_HERE, base::Bind(&Client::ProvidePictureBuffers, client_, |
- requested_num_pics_, format, 1, requested_pic_size_, |
- VaapiPicture::GetGLTextureTarget())); |
+ FROM_HERE, |
+ base::Bind(&Client::ProvidePictureBuffers, client_, requested_num_pics_, |
+ 1, requested_pic_size_, VaapiPicture::GetGLTextureTarget())); |
} |
void VaapiVideoDecodeAccelerator::Decode( |
@@ -1056,6 +1042,22 @@ |
const base::WeakPtr<Client>& decode_client, |
const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { |
return false; |
+} |
+ |
+static VideoPixelFormat BufferFormatToVideoPixelFormat( |
+ gfx::BufferFormat format) { |
+ switch (format) { |
+ case gfx::BufferFormat::BGRA_8888: |
+ return PIXEL_FORMAT_ARGB; |
+ |
+ default: |
+ LOG(FATAL) << "Add more cases as needed"; |
+ return PIXEL_FORMAT_UNKNOWN; |
+ } |
+} |
+ |
+VideoPixelFormat VaapiVideoDecodeAccelerator::GetOutputFormat() const { |
+ return BufferFormatToVideoPixelFormat(kOutputPictureFormat); |
} |
bool VaapiVideoDecodeAccelerator::DecodeSurface( |