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& toXYZ() const { return fToXYZD50; } |
mtklein
2016/09/08 15:04:36
You may want to keep an alias xyz() to stage updat
msarett
2016/09/08 15:06:07
Now that you've done all this typing, do you think
| |
70 | 70 |
71 /** | 71 /** |
72 * Returns true if the color space gamma is near enough to be approximated as sRGB. | 72 * Returns true if the color space gamma is near enough to be approximated as sRGB. |
73 */ | 73 */ |
74 bool gammaCloseToSRGB() const; | 74 bool gammaCloseToSRGB() const; |
75 | 75 |
76 /** | 76 /** |
77 * Returns true if the color space gamma is linear. | 77 * Returns true if the color space gamma is linear. |
78 */ | 78 */ |
79 bool gammaIsLinear() const; | 79 bool gammaIsLinear() const; |
(...skipping 18 matching lines...) Expand all Loading... | |
98 */ | 98 */ |
99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); | 99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); |
100 | 100 |
101 protected: | 101 protected: |
102 SkColorSpace(const SkMatrix44& toXYZD50); | 102 SkColorSpace(const SkMatrix44& toXYZD50); |
103 | 103 |
104 const SkMatrix44 fToXYZD50; | 104 const SkMatrix44 fToXYZD50; |
105 }; | 105 }; |
106 | 106 |
107 #endif | 107 #endif |
OLD | NEW |