| Index: media/blink/skcanvas_video_renderer.cc
|
| diff --git a/media/blink/skcanvas_video_renderer.cc b/media/blink/skcanvas_video_renderer.cc
|
| index 16c7d87b4c341bce711b083936c8f3a8c4da04e7..50d1c7e3879c310af4a9fd63b46e1355649876e5 100644
|
| --- a/media/blink/skcanvas_video_renderer.cc
|
| +++ b/media/blink/skcanvas_video_renderer.cc
|
| @@ -153,11 +153,11 @@ scoped_ptr<SkImage> CreateSkImageFromVideoFrameYUVTextures(
|
| {uv_tex_size.width(), uv_tex_size.height()},
|
| };
|
|
|
| - // TODO(dcastagna): Skia currently doesn't support Rec709 YUV conversion.
|
| - DCHECK(!CheckColorSpace(video_frame, media::COLOR_SPACE_HD_REC709));
|
| SkYUVColorSpace color_space = kRec601_SkYUVColorSpace;
|
| if (CheckColorSpace(video_frame, media::COLOR_SPACE_JPEG))
|
| color_space = kJPEG_SkYUVColorSpace;
|
| + else if (CheckColorSpace(video_frame, media::COLOR_SPACE_HD_REC709))
|
| + color_space = kRec709_SkYUVColorSpace;
|
|
|
| SkImage* img = SkImage::NewFromYUVTexturesCopy(context_3d.gr_context,
|
| color_space, handles, yuvSizes,
|
| @@ -232,10 +232,9 @@ class VideoImageGenerator : public SkImageGenerator {
|
| size_t row_bytes[3],
|
| SkYUVColorSpace* color_space) override {
|
| if (!frame_.get() || !media::IsYuvPlanar(frame_->format()) ||
|
| - // TODO(rileya): Skia currently doesn't support Rec709 YUV conversion,
|
| - // or YUVA conversion. Remove this case once it does. As-is we will
|
| - // fall back on the pure-software path in this case.
|
| - CheckColorSpace(frame_, COLOR_SPACE_HD_REC709) ||
|
| + // TODO(rileya): Skia currently doesn't support YUVA conversion. Remove
|
| + // this case once it does. As-is we will fall back on the pure-software
|
| + // path in this case.
|
| frame_->format() == PIXEL_FORMAT_YV12A) {
|
| return false;
|
| }
|
| @@ -243,6 +242,8 @@ class VideoImageGenerator : public SkImageGenerator {
|
| if (color_space) {
|
| if (CheckColorSpace(frame_, COLOR_SPACE_JPEG))
|
| *color_space = kJPEG_SkYUVColorSpace;
|
| + else if (CheckColorSpace(frame_, COLOR_SPACE_HD_REC709))
|
| + *color_space = kRec709_SkYUVColorSpace;
|
| else
|
| *color_space = kRec601_SkYUVColorSpace;
|
| }
|
|
|