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

Unified Diff: ui/gfx/color_space.cc

Issue 2877093002: color: Add command line flag to force output color space (Closed)
Patch Set: Fix windows again 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/color_space_win.cc » ('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 2bb99827fad02667070cbce17df6d6dc1225e7a3..8f72e6398abc11cff9751d149562403760f32bc2 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -444,6 +444,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;
@@ -547,6 +558,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/color_space_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698