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

Unified Diff: ui/gfx/color_space.cc

Issue 2873203003: color: Add --force-color-profile command line flag (Closed)
Patch Set: Created 3 years, 7 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 | « ui/gfx/color_space.h ('k') | ui/gfx/icc_profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.cc
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index ef58e58039468528d7b56fd2683f8f2926a03bb7..fe4fde75bd6239509fc9b47138e21bc431d12e02 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -533,7 +533,7 @@ void ColorSpace::GetPrimaryMatrix(SkMatrix44* to_XYZD50) const {
case ColorSpace::PrimaryID::BT709:
// BT709 is our default case. Put it after the switch just
- // in case we somehow get an id which is not listed in the switch.
+ // in case we somhow get an id which is not listed in the switch.
// (We don't want to use "default", because we want the compiler
// to tell us if we forgot some enum values.)
primaries.fRX = 0.640f;
@@ -580,6 +580,17 @@ void ColorSpace::GetPrimaryMatrix(SkMatrix44* to_XYZD50) const {
primaries.fWY = 0.3290f;
break;
+ case ColorSpace::PrimaryID::APPLE_GENERIC_RGB:
+ primaries.fRX = 0.63002f;
+ primaries.fRY = 0.34000f;
+ primaries.fGX = 0.29505f;
+ primaries.fGY = 0.60498f;
+ primaries.fBX = 0.15501f;
+ primaries.fBY = 0.07701f;
+ primaries.fWX = 0.3127f;
+ primaries.fWY = 0.3290f;
+ break;
+
case ColorSpace::PrimaryID::FILM:
primaries.fRX = 0.681f;
primaries.fRY = 0.319f;
@@ -683,6 +694,9 @@ bool ColorSpace::GetTransferFunction(SkColorSpaceTransferFn* fn) const {
case ColorSpace::TransferID::LINEAR:
case ColorSpace::TransferID::LINEAR_HDR:
return true;
+ case ColorSpace::TransferID::GAMMA18:
+ fn->fG = 1.801f;
+ return true;
case ColorSpace::TransferID::GAMMA22:
fn->fG = 2.2f;
return true;
« no previous file with comments | « ui/gfx/color_space.h ('k') | ui/gfx/icc_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698