Commit acfaf209 authored by Tobias Sargeant's avatar Tobias Sargeant Committed by Commit Bot

If avoiding one component textures, do not attempt to apply color space.

PowerVR drives that have problems with one component textures being
bount to an EGLImage require YUV->RGB conversion to be done early in
software. In that case it's not correct to pass the color space
of the video frame on to the compositor, because it doesn't reflect the
color space of the converted frame. Instead, just reset it to the
identity color space.

Bug: 818072
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I44751300a134d29240217cf80c6a5c663227745d
Reviewed-on: https://chromium-review.googlesource.com/955592Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542277}
parent 61c71162
......@@ -338,6 +338,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
bool texture_needs_rgb_conversion =
!software_compositor &&
output_resource_format == viz::ResourceFormat::RGBA_8888;
size_t output_plane_count = media::VideoFrame::NumPlanes(input_frame_format);
// TODO(skaslev): If we're in software compositing mode, we do the YUV -> RGB
......@@ -348,6 +349,11 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
output_resource_format = viz::RGBA_8888;
output_plane_count = 1;
bits_per_channel = 8;
// The YUV to RGB conversion will be performed when we convert
// from single-channel textures to an RGBA texture via
// ConvertVideoFrameToRGBPixels below.
output_color_space = output_color_space.GetAsFullRangeRGB();
}
// Drop recycled resources that are the wrong format.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment