Chromium Code Reviews| Index: cc/resources/video_resource_updater.cc |
| diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc |
| index 9fe434f3837211b63d4ded74b8b39ced0a398b20..3b5bed2ac65e495879a72ac39dc3464351be3239 100644 |
| --- a/cc/resources/video_resource_updater.cc |
| +++ b/cc/resources/video_resource_updater.cc |
| @@ -358,11 +358,9 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes( |
| break; |
| } |
| - // TODO(dshwang): support PIXEL_FORMAT_Y16. crbug.com/624436 |
| - DCHECK_NE(bits_per_channel, 16); |
| - |
| - // Only YUV software video frames are supported. |
| - if (!media::IsYuvPlanar(input_frame_format)) { |
| + // Only YUV and Y16 software video frames are supported. |
| + const bool isYuvPlanar = media::IsYuvPlanar(input_frame_format); |
| + if (!(isYuvPlanar || input_frame_format == media::PIXEL_FORMAT_Y16)) { |
| NOTREACHED() << media::VideoPixelFormatToString(input_frame_format); |
| return VideoFrameExternalResources(); |
| } |
| @@ -370,7 +368,8 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes( |
| const bool software_compositor = context_provider_ == NULL; |
| ResourceFormat output_resource_format = |
| - resource_provider_->YuvResourceFormat(bits_per_channel); |
| + isYuvPlanar ? resource_provider_->YuvResourceFormat(bits_per_channel) |
|
aleksandar.stojiljkovic
2016/10/20 21:52:49
Check above only allows Yuv and Y16, so ResourceFo
|
| + : ResourceFormat::RGBA_8888; |
| // If GPU compositing is enabled, but the output resource format |
| // returned by the resource provider is RGBA_8888, then a GPU driver |