Commit ace0b334 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

ui:DisplayChangeObserver: Only fill HDR DisplayColorSpaces if supported

This CL lands a tiny fix in the DisplayChangeObserver's: we should only
fill in the HDR DisplayColorSpaces if the monitor actually supports it.
I just stumbled upon it while debugging the next CL in the chain.

Bug: 958166
Change-Id: I3ee41501c04b692e12e1e96959a0d6cbf3c7489b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317815
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791406}
parent 5a899167
...@@ -96,7 +96,7 @@ gfx::DisplayColorSpaces FillDisplayColorSpaces( ...@@ -96,7 +96,7 @@ gfx::DisplayColorSpaces FillDisplayColorSpaces(
gfx::DisplayColorSpaces display_color_spaces( gfx::DisplayColorSpaces display_color_spaces(
gfx::ColorSpace::CreateSRGB(), DisplaySnapshot::PrimaryFormat()); gfx::ColorSpace::CreateSRGB(), DisplaySnapshot::PrimaryFormat());
if (allow_high_bit_depth) { if (allow_high_bit_depth && snapshot_color_space.IsHDR()) {
constexpr float kSDRJoint = 0.75; constexpr float kSDRJoint = 0.75;
constexpr float kHDRLevel = 3.0; constexpr float kHDRLevel = 3.0;
const auto primary_id = snapshot_color_space.GetPrimaryID(); const auto primary_id = snapshot_color_space.GetPrimaryID();
......
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