Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: src/core/SkColorSpace_Base.h

Issue 2302413002: Delete SkColorSpace::kUnknown_Named, remove fNamed field (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a bare ptr instead of an sk_sp Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkColorSpace.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/core/SkColorSpace.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698