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

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

Issue 2193223002: Hide (mostly) unused SkColorSpace writeToICC() function (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Continue testing Created 4 years, 4 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 | « no previous file | src/pdf/SkPDFDocument.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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 class SkColorSpace_Base : public SkColorSpace { 174 class SkColorSpace_Base : public SkColorSpace {
175 public: 175 public:
176 176
177 static sk_sp<SkColorSpace> NewRGB(float gammas[3], const SkMatrix44& toXYZD5 0); 177 static sk_sp<SkColorSpace> NewRGB(float gammas[3], const SkMatrix44& toXYZD5 0);
178 178
179 const SkGammas* gammas() const { return fGammas.get(); } 179 const SkGammas* gammas() const { return fGammas.get(); }
180 180
181 const SkColorLookUpTable* colorLUT() const { return fColorLUT.get(); } 181 const SkColorLookUpTable* colorLUT() const { return fColorLUT.get(); }
182 182
183 private:
184
183 /** 185 /**
184 * Writes this object as an ICC profile. 186 * FIXME (msarett):
187 * Hiding this function until we can determine if we need it. Known issues include:
188 * Only writes 3x3 matrices
189 * Only writes float gammas
190 * Rejected by some parsers because the "profile description" is empty
185 */ 191 */
186 sk_sp<SkData> writeToICC() const; 192 sk_sp<SkData> writeToICC() const;
187 193
188 private:
189
190 static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& t oXYZD50); 194 static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& t oXYZD50);
191 195
192 SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ, Named name d); 196 SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ, Named name d);
193 197
194 SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, GammaNamed gammaNamed, 198 SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, GammaNamed gammaNamed,
195 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);
196 200
197 sk_sp<SkColorLookUpTable> fColorLUT; 201 sk_sp<SkColorLookUpTable> fColorLUT;
198 sk_sp<SkGammas> fGammas; 202 sk_sp<SkGammas> fGammas;
199 sk_sp<SkData> fProfileData; 203 sk_sp<SkData> fProfileData;
200 204
201 friend class SkColorSpace; 205 friend class SkColorSpace;
202 friend class ColorSpaceXformTest; 206 friend class ColorSpaceXformTest;
207 friend class ColorSpaceTest;
203 typedef SkColorSpace INHERITED; 208 typedef SkColorSpace INHERITED;
204 }; 209 };
205 210
206 static inline SkColorSpace_Base* as_CSB(SkColorSpace* colorSpace) { 211 static inline SkColorSpace_Base* as_CSB(SkColorSpace* colorSpace) {
207 return static_cast<SkColorSpace_Base*>(colorSpace); 212 return static_cast<SkColorSpace_Base*>(colorSpace);
208 } 213 }
209 214
210 static inline const SkColorSpace_Base* as_CSB(const SkColorSpace* colorSpace) { 215 static inline const SkColorSpace_Base* as_CSB(const SkColorSpace* colorSpace) {
211 return static_cast<const SkColorSpace_Base*>(colorSpace); 216 return static_cast<const SkColorSpace_Base*>(colorSpace);
212 } 217 }
213 218
214 static inline SkColorSpace_Base* as_CSB(const sk_sp<SkColorSpace>& colorSpace) { 219 static inline SkColorSpace_Base* as_CSB(const sk_sp<SkColorSpace>& colorSpace) {
215 return static_cast<SkColorSpace_Base*>(colorSpace.get()); 220 return static_cast<SkColorSpace_Base*>(colorSpace.get());
216 } 221 }
217 222
218 #endif 223 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698