• Frank Liberato's avatar
    Switch |screen_info| to GetOutputColorSpace. · 39015b21
    Frank Liberato authored
    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}
    39015b21
display_util.cc 5.59 KB