OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkColorSpace_DEFINED | 8 #ifndef SkColorSpace_DEFINED |
9 #define SkColorSpace_DEFINED | 9 #define SkColorSpace_DEFINED |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 }; | 34 }; |
35 | 35 |
36 enum RenderTargetGamma : uint8_t { | 36 enum RenderTargetGamma : uint8_t { |
37 kLinear_RenderTargetGamma, | 37 kLinear_RenderTargetGamma, |
38 | 38 |
39 /** | 39 /** |
40 * Transfer function is the canonical sRGB curve, which has a short lin
ear segment | 40 * Transfer function is the canonical sRGB curve, which has a short lin
ear segment |
41 * followed by a 2.4f exponential. | 41 * followed by a 2.4f exponential. |
42 */ | 42 */ |
43 kSRGB_RenderTargetGamma, | 43 kSRGB_RenderTargetGamma, |
44 | |
45 // DO NOT USE: Being deleted. | |
46 kLinear_GammaNamed = kLinear_RenderTargetGamma, | |
47 }; | 44 }; |
48 | 45 |
49 /** | 46 /** |
50 * Create an SkColorSpace from a transfer function and a color gamut transf
orm to D50 XYZ. | 47 * Create an SkColorSpace from a transfer function and a color gamut transf
orm to D50 XYZ. |
51 */ | 48 */ |
52 static sk_sp<SkColorSpace> NewRGB(RenderTargetGamma gamma, const SkMatrix44&
toXYZD50); | 49 static sk_sp<SkColorSpace> NewRGB(RenderTargetGamma gamma, const SkMatrix44&
toXYZD50); |
53 | 50 |
54 /** | 51 /** |
55 * Create a common, named SkColorSpace. | 52 * Create a common, named SkColorSpace. |
56 */ | 53 */ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 */ | 98 */ |
102 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); | 99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); |
103 | 100 |
104 protected: | 101 protected: |
105 SkColorSpace(const SkMatrix44& toXYZD50); | 102 SkColorSpace(const SkMatrix44& toXYZD50); |
106 | 103 |
107 const SkMatrix44 fToXYZD50; | 104 const SkMatrix44 fToXYZD50; |
108 }; | 105 }; |
109 | 106 |
110 #endif | 107 #endif |
OLD | NEW |