diff options
author | 2017-02-07 17:06:09 +0000 | |
---|---|---|
committer | 2017-02-07 17:06:24 +0000 | |
commit | 1f2fff2544a9dc6a0f169a017d374eca9f04c6b5 (patch) | |
tree | e97779c04ea0d2059cbd6291de3cbfbf27c1cc61 /include | |
parent | ecaaf6f1c156e5690200322fc2636380c1f63dd8 (diff) |
Revert "SkColorSpace: remove named API, add gamut API"
This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8.
Reason for revert: Breaks everything
Original change's description:
> SkColorSpace: remove named API, add gamut API
>
> BUG=skia:
>
> Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
> Reviewed-on: https://skia-review.googlesource.com/8021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4
Reviewed-on: https://skia-review.googlesource.com/8127
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColorSpace.h | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h index 0399ca8c72..1bcb44fbc5 100644 --- a/include/core/SkColorSpace.h +++ b/include/core/SkColorSpace.h @@ -53,7 +53,6 @@ struct SK_API SkColorSpaceTransferFn { class SK_API SkColorSpace : public SkRefCnt { public: -#ifdef SK_USE_LEGACY_NAMED_COLOR_SPACE /** * Common, named profiles that we can recognize. */ @@ -77,23 +76,6 @@ public: kSRGBLinear_Named, }; - /** - * Create a common, named SkColorSpace. - */ - static sk_sp<SkColorSpace> MakeNamed(Named); -#endif - - /** - * Create the sRGB color space. - */ - static sk_sp<SkColorSpace> MakeSRGB(); - - /** - * Colorspace with the sRGB primaries, but a linear (1.0) gamma. Commonly used for - * half-float surfaces, and high precision individual colors (gradient stops, etc...) - */ - static sk_sp<SkColorSpace> MakeSRGBLinear(); - enum RenderTargetGamma : uint8_t { kLinear_RenderTargetGamma, @@ -104,24 +86,21 @@ public: kSRGB_RenderTargetGamma, }; - enum Gamut { - kSRGB_Gamut, - kAdobeRGB_Gamut, - kDCIP3_D65_Gamut, - kRec2020_Gamut, - }; - /** * Create an SkColorSpace from a transfer function and a color gamut. * - * Transfer function can be specified as an enum or as the coefficients to an equation. - * Gamut can be specified as an enum or as the matrix transformation to XYZ D50. + * Transfer function can be specified as a render target, as the coefficients to an equation, + * or as three exponents (R, G, B). + * Gamut is specified using the matrix transformation to XYZ D50. */ - static sk_sp<SkColorSpace> MakeRGB(RenderTargetGamma gamma, Gamut gamut); static sk_sp<SkColorSpace> MakeRGB(RenderTargetGamma gamma, const SkMatrix44& toXYZD50); - static sk_sp<SkColorSpace> MakeRGB(const SkColorSpaceTransferFn& coeffs, Gamut gamut); static sk_sp<SkColorSpace> MakeRGB(const SkColorSpaceTransferFn& coeffs, - const SkMatrix44& toXYZD50); + const SkMatrix44& toXYZD50); + + /** + * Create a common, named SkColorSpace. + */ + static sk_sp<SkColorSpace> MakeNamed(Named); /** * Create an SkColorSpace from an ICC profile. |