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

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

Issue 2221983002: Fix Equals and serialization for rare pngs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Objects of this type are created in a custom fashion using sk_malloc_thro w 167 // Objects of this type are created in a custom fashion using sk_malloc_thro w
168 // and therefore must be sk_freed. 168 // and therefore must be sk_freed.
169 void* operator new(size_t size) = delete; 169 void* operator new(size_t size) = delete;
170 void* operator new(size_t, void* p) { return p; } 170 void* operator new(size_t, void* p) { return p; }
171 void operator delete(void* p) { sk_free(p); } 171 void operator delete(void* p) { sk_free(p); }
172 }; 172 };
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(const float gammas[3], const SkMatrix44& t oXYZD50);
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: 183 private:
184 184
185 /** 185 /**
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:
(...skipping 26 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698