Commit 43180832 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Don't use kCGColorSpaceITUR_2020_HLG for overlays

kCGColorSpaceITUR_2020_HLG expects values in the range of [0, 12], while
the rest of the pipeline expects values in the range of [0, 1].

Bug: 1061723
Change-Id: Ia46b3cde31515c7026607bc2a6e8e4b981ab9abc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2110674
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752485}
parent a3833370
......@@ -146,7 +146,11 @@ bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
ColorSpace::TransferID::ARIB_STD_B67,
ColorSpace::MatrixID::BT2020_NCL,
ColorSpace::RangeID::LIMITED)) {
color_space_name = kCGColorSpaceITUR_2020_HLG;
// The CGColorSpace kCGColorSpaceITUR_2020_HLG cannot be used here because
// it expects that "pixel values should be between 0.0 and 12.0", while
// Chrome uses pixel values between 0.0 and 1.0.
// https://crbug.com/1061723.
return false;
}
}
if (color_space_name) {
......
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