Commit 39015b21 authored by Frank Liberato's avatar Frank Liberato Committed by Commit Bot

Switch |screen_info| to GetOutputColorSpace.

When constructing |screen_info| for the renderer, display_util
selected the raster color space for the color space to send.
For HDR display color spaces, this turns out to be the non-HDR
display P3 color space.

During media playback on windows, this color space is used to
notify the video decoder about the preferred format for the decoded
video frames.  Since it's a non-hdr space, the decoder converts to
sRGB rather than scRGB.

This CL switches to the output color space, rather than raster.

For reference, the observed combinations are:

Display type  |  ColorSpaceUsage | Resulting CS
-- before CL --
SDR              kRaster           sRGB
HDR              kRaster           Display P3

-- after CL --
SDR              kHDR              sRGB
HDR              kHDR              Linear HDR

-- Tried |kSRGB| just to see what would happen --
SDR              kSRGB             sRGB
HDR              kSRGB             sRGB

Bug: 1065869
Change-Id: I3392fb0062e0276392e0e116ddd9a57b654e795d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135892Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarChris Blume <cblume@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756508}
parent f2aebe92
...@@ -20,7 +20,8 @@ void DisplayUtil::DisplayToScreenInfo(ScreenInfo* screen_info, ...@@ -20,7 +20,8 @@ void DisplayUtil::DisplayToScreenInfo(ScreenInfo* screen_info,
// TODO(husky): Remove any Android system controls from availableRect. // TODO(husky): Remove any Android system controls from availableRect.
screen_info->available_rect = display.work_area(); screen_info->available_rect = display.work_area();
screen_info->device_scale_factor = display.device_scale_factor(); screen_info->device_scale_factor = display.device_scale_factor();
screen_info->color_space = display.color_spaces().GetRasterColorSpace(); screen_info->color_space = display.color_spaces().GetOutputColorSpace(
gfx::ContentColorUsage::kHDR, false);
screen_info->depth = display.color_depth(); screen_info->depth = display.color_depth();
screen_info->depth_per_component = display.depth_per_component(); screen_info->depth_per_component = display.depth_per_component();
screen_info->is_monochrome = display.is_monochrome(); screen_info->is_monochrome = display.is_monochrome();
......
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