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_Base_DEFINED | 8 #ifndef SkColorSpace_Base_DEFINED |
9 #define SkColorSpace_Base_DEFINED | 9 #define SkColorSpace_Base_DEFINED |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 * FIXME (msarett): | 186 * FIXME (msarett): |
187 * Hiding this function until we can determine if we need it. Known issues
include: | 187 * Hiding this function until we can determine if we need it. Known issues
include: |
188 * Only writes 3x3 matrices | 188 * Only writes 3x3 matrices |
189 * Only writes float gammas | 189 * Only writes float gammas |
190 * Rejected by some parsers because the "profile description" is empty | 190 * Rejected by some parsers because the "profile description" is empty |
191 */ | 191 */ |
192 sk_sp<SkData> writeToICC() const; | 192 sk_sp<SkData> writeToICC() const; |
193 | 193 |
194 static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& t
oXYZD50); | 194 static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& t
oXYZD50); |
195 | 195 |
196 SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ, Named name
d); | 196 SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ); |
197 | 197 |
198 SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, GammaNamed gammaNamed, | 198 SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, GammaNamed gammaNamed, |
199 sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ, sk_sp<SkD
ata> profileData); | 199 sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ, sk_sp<SkD
ata> profileData); |
200 | 200 |
201 sk_sp<SkColorLookUpTable> fColorLUT; | 201 sk_sp<SkColorLookUpTable> fColorLUT; |
202 sk_sp<SkGammas> fGammas; | 202 sk_sp<SkGammas> fGammas; |
203 sk_sp<SkData> fProfileData; | 203 sk_sp<SkData> fProfileData; |
204 | 204 |
205 friend class SkColorSpace; | 205 friend class SkColorSpace; |
206 friend class ColorSpaceXformTest; | 206 friend class ColorSpaceXformTest; |
207 friend class ColorSpaceTest; | 207 friend class ColorSpaceTest; |
208 typedef SkColorSpace INHERITED; | 208 typedef SkColorSpace INHERITED; |
209 }; | 209 }; |
210 | 210 |
211 static inline SkColorSpace_Base* as_CSB(SkColorSpace* colorSpace) { | 211 static inline SkColorSpace_Base* as_CSB(SkColorSpace* colorSpace) { |
212 return static_cast<SkColorSpace_Base*>(colorSpace); | 212 return static_cast<SkColorSpace_Base*>(colorSpace); |
213 } | 213 } |
214 | 214 |
215 static inline const SkColorSpace_Base* as_CSB(const SkColorSpace* colorSpace) { | 215 static inline const SkColorSpace_Base* as_CSB(const SkColorSpace* colorSpace) { |
216 return static_cast<const SkColorSpace_Base*>(colorSpace); | 216 return static_cast<const SkColorSpace_Base*>(colorSpace); |
217 } | 217 } |
218 | 218 |
219 static inline SkColorSpace_Base* as_CSB(const sk_sp<SkColorSpace>& colorSpace) { | 219 static inline SkColorSpace_Base* as_CSB(const sk_sp<SkColorSpace>& colorSpace) { |
220 return static_cast<SkColorSpace_Base*>(colorSpace.get()); | 220 return static_cast<SkColorSpace_Base*>(colorSpace.get()); |
221 } | 221 } |
222 | 222 |
223 #endif | 223 #endif |
OLD | NEW |