Index: cc/resources/video_resource_updater.cc |
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc |
index 4c6b21619b2de28f55d5e6f1aeb935a028326d36..82201607726dcdf0c68f348328dc5422ab54db1a 100644 |
--- a/cc/resources/video_resource_updater.cc |
+++ b/cc/resources/video_resource_updater.cc |
@@ -428,11 +428,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); |
danakj
2016/10/24 21:46:37
use chromium style please for isYuvPlanar
aleksandar.stojiljkovic
2016/10/25 10:12:28
Done.
|
+ if (!(isYuvPlanar || input_frame_format == media::PIXEL_FORMAT_Y16)) { |
NOTREACHED() << media::VideoPixelFormatToString(input_frame_format); |
danakj
2016/10/24 21:46:37
Hm where did this NOTREACHED();return; come from?
aleksandar.stojiljkovic
2016/10/25 10:12:28
NOTREACHED();return; is there from previous code;
|
return VideoFrameExternalResources(); |
} |
@@ -440,7 +438,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) |
+ : ResourceFormat::RGBA_8888; |
danakj
2016/10/24 21:46:37
Can you leave a comment explaining this in the con
aleksandar.stojiljkovic
2016/10/25 10:12:28
Done. Thanks.
|
// If GPU compositing is enabled, but the output resource format |
// returned by the resource provider is RGBA_8888, then a GPU driver |