Chromium Code Reviews| Index: ui/gfx/color_space.cc |
| diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc |
| index 2bb99827fad02667070cbce17df6d6dc1225e7a3..161671961eccd63436dc385034fc35149f7090b1 100644 |
| --- a/ui/gfx/color_space.cc |
| +++ b/ui/gfx/color_space.cc |
| @@ -397,7 +397,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. |
|
Avi (use Gerrit)
2017/05/12 21:06:32
typo :(
ccameron
2017/05/12 21:46:19
Got it this time!
|
| // (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; |
| @@ -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; |