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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 static sk_sp<SkColorSpace> NewICC(const void*, size_t); | 59 static sk_sp<SkColorSpace> NewICC(const void*, size_t); |
60 | 60 |
61 /** | 61 /** |
62 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma. | 62 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma. |
63 */ | 63 */ |
64 sk_sp<SkColorSpace> makeLinearGamma(); | 64 sk_sp<SkColorSpace> makeLinearGamma(); |
65 | 65 |
66 /** | 66 /** |
67 * Returns the matrix used to transform src gamut to XYZ D50. | 67 * Returns the matrix used to transform src gamut to XYZ D50. |
68 */ | 68 */ |
69 const SkMatrix44& xyz() const { return fToXYZD50; } | 69 const SkMatrix44& toXYZD50() const { return fToXYZD50; } |
70 | |
71 /** | |
72 * DEPRECATED - use toXYZD50 instead | |
73 */ | |
74 const SkMatrix44& xyz() const { return toXYZD50(); } | |
msarett
2016/09/08 15:35:21
I think you can go ahead and remove this. Trybot
| |
70 | 75 |
71 /** | 76 /** |
72 * Returns true if the color space gamma is near enough to be approximated as sRGB. | 77 * Returns true if the color space gamma is near enough to be approximated as sRGB. |
73 */ | 78 */ |
74 bool gammaCloseToSRGB() const; | 79 bool gammaCloseToSRGB() const; |
75 | 80 |
76 /** | 81 /** |
77 * Returns true if the color space gamma is linear. | 82 * Returns true if the color space gamma is linear. |
78 */ | 83 */ |
79 bool gammaIsLinear() const; | 84 bool gammaIsLinear() const; |
(...skipping 18 matching lines...) Expand all Loading... | |
98 */ | 103 */ |
99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); | 104 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); |
100 | 105 |
101 protected: | 106 protected: |
102 SkColorSpace(const SkMatrix44& toXYZD50); | 107 SkColorSpace(const SkMatrix44& toXYZD50); |
103 | 108 |
104 const SkMatrix44 fToXYZD50; | 109 const SkMatrix44 fToXYZD50; |
105 }; | 110 }; |
106 | 111 |
107 #endif | 112 #endif |
OLD | NEW |