Index: content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
index 754c1006cc99f6ff22b45c8d2be9a99d8e28332d..3d7730426ebbe8a748e11c353aab6d2bdafcba24 100644 |
--- a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
+++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
@@ -246,12 +246,17 @@ unsigned RendererGpuVideoAcceleratorFactories::ImageTextureTarget( |
} |
media::GpuVideoAcceleratorFactories::OutputFormat |
-RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat() { |
+RendererGpuVideoAcceleratorFactories::VideoFrameOutputFormat( |
+ media::VideoPixelFormat format) { |
DCHECK(task_runner_->BelongsToCurrentThread()); |
if (CheckContextLost()) |
return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED; |
cc::ContextProvider::ScopedContextLock lock(context_provider_); |
auto capabilities = context_provider_->ContextCapabilities(); |
+ if (format == media::PIXEL_FORMAT_Y16) |
+ return capabilities.texture_rg |
+ ? media::GpuVideoAcceleratorFactories::OutputFormat::Y16 |
+ : media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED; |
if (capabilities.image_ycbcr_420v) |
return media::GpuVideoAcceleratorFactories::OutputFormat::NV12_SINGLE_GMB; |
if (capabilities.image_ycbcr_422) |