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

Side by Side Diff: include/core/SkColorSpace.h

Issue 2196743002: Add SkColorSpace::Equals() API (Closed) Base URL: https://skia.googlesource.com/skia.git@cscleanup
Patch Set: Fix logic 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 | include/core/SkImageInfo.h » ('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_DEFINED 8 #ifndef SkColorSpace_DEFINED
9 #define SkColorSpace_DEFINED 9 #define SkColorSpace_DEFINED
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 sk_sp<SkData> serialize() const; 97 sk_sp<SkData> serialize() const;
98 98
99 /** 99 /**
100 * If |memory| is nullptr, returns the size required to serialize. 100 * If |memory| is nullptr, returns the size required to serialize.
101 * Otherwise, serializes into |memory| and returns the size. 101 * Otherwise, serializes into |memory| and returns the size.
102 */ 102 */
103 size_t writeToMemory(void* memory) const; 103 size_t writeToMemory(void* memory) const;
104 104
105 static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length); 105 static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length);
106 106
107 /**
108 * If both are null, we return true. If one is null and the other is not, we return false.
109 * If both are non-null, we do a deeper compare.
110 */
111 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst);
112
107 protected: 113 protected:
108 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named) ; 114 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named) ;
109 115
110 const GammaNamed fGammaNamed; 116 const GammaNamed fGammaNamed;
111 const SkMatrix44 fToXYZD50; 117 const SkMatrix44 fToXYZD50;
112 const Named fNamed; 118 const Named fNamed;
113 }; 119 };
114 120
115 #endif 121 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698