Chromium Code Reviews| Index: include/core/SkColorSpace.h |
| diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h |
| index f942780b7c73a9a0936f044f977693b5065826ba..b053cee40a963a773a3074b20e9ab8d1f60525d3 100644 |
| --- a/include/core/SkColorSpace.h |
| +++ b/include/core/SkColorSpace.h |
| @@ -23,27 +23,18 @@ public: |
| kAdobeRGB_Named, |
| }; |
| - /** |
| - * Create an SkColorSpace from the src gamma and a transform from src gamut to D50 XYZ. |
| - */ |
| - static sk_sp<SkColorSpace> NewRGB(const float gammas[3], const SkMatrix44& toXYZD50); |
| - |
| - /** |
| - * Create a common, named SkColorSpace. |
| - */ |
| - static sk_sp<SkColorSpace> NewNamed(Named); |
| - |
| - /** |
| - * Create an SkColorSpace from an ICC profile. |
| - */ |
| - static sk_sp<SkColorSpace> NewICC(const void*, size_t); |
| - |
| enum GammaNamed { |
| kLinear_GammaNamed, |
| /** |
| - * Gamma curve is a close match to the 2.2f exponential curve. This is by far |
| - * the most common gamma, and is used by sRGB and Adobe RGB profiles. |
| + * Gamma curve is a close match to the canonical sRGB curve, which has |
| + * a short linear segment followed by a 2.4f exponential. |
| + */ |
| + kSRGB_GammaNamed, |
| + |
| + /** |
| + * Gamma curve is a close match to the 2.2f exponential curve. This is |
| + * used by Adobe RGB profiles and is common on monitors as well. |
| */ |
| k2Dot2Curve_GammaNamed, |
| @@ -55,6 +46,21 @@ public: |
| kNonStandard_GammaNamed, |
| }; |
| + /** |
| + * Create an SkColorSpace from the src gamma and a transform from src gamut to D50 XYZ. |
| + */ |
| + static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& toXYZD50); |
|
msarett
2016/06/14 21:30:28
I've changed this to take a GammaNamed instead of
|
| + |
| + /** |
| + * Create a common, named SkColorSpace. |
| + */ |
| + static sk_sp<SkColorSpace> NewNamed(Named); |
| + |
| + /** |
| + * Create an SkColorSpace from an ICC profile. |
| + */ |
| + static sk_sp<SkColorSpace> NewICC(const void*, size_t); |
| + |
| GammaNamed gammaNamed() const { return fGammaNamed; } |
| /** |