Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: ui/gfx/color_transform.cc

Issue 2650483002: Don't try to map HDR to SDR if the output is HDR (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_transform.cc
diff --git a/ui/gfx/color_transform.cc b/ui/gfx/color_transform.cc
index 156825534242b362c81b660dd2cabf32fb0fcfa2..46ccdaa76f1ec9bd388bd45887cf9877649deb39 100644
--- a/ui/gfx/color_transform.cc
+++ b/ui/gfx/color_transform.cc
@@ -928,16 +928,20 @@ class ColorSpaceToColorSpaceTransform {
break;
case ColorSpace::TransferID::SMPTEST2084:
- // We don't have an HDR display, so replace SMPTE 2084 with something
- // that returns ranges more or less suitable for a normal display.
- from.transfer_ = ColorSpace::TransferID::SMPTEST2084_NON_HDR;
+ if (!to.IsHDR()) {
+ // We don't have an HDR display, so replace SMPTE 2084 with
+ // something that returns ranges more or less suitable for a normal
+ // display.
+ from.transfer_ = ColorSpace::TransferID::SMPTEST2084_NON_HDR;
+ }
break;
case ColorSpace::TransferID::ARIB_STD_B67:
- // Interpreting HLG using a gamma 2.4 works reasonably well for SDR
- // displays. Once we have HDR output capabilies, we'll need to
- // change this.
- from.transfer_ = ColorSpace::TransferID::GAMMA24;
+ if (!to.IsHDR()) {
+ // Interpreting HLG using a gamma 2.4 works reasonably well for SDR
+ // displays.
+ from.transfer_ = ColorSpace::TransferID::GAMMA24;
+ }
break;
default: // Do nothing
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698