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

Unified Diff: src/core/SkColorSpace.cpp

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkColorSpace.cpp
diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp
index 5df45fff4126d7e9a08a1251e9b9cde029ae7de8..10cf3fa5e202589bff7f431b8757787fd8326af0 100644
--- a/src/core/SkColorSpace.cpp
+++ b/src/core/SkColorSpace.cpp
@@ -6,6 +6,7 @@
*/
#include "SkColorSpace.h"
+#include "SkColorSpacePriv.h"
#include "SkColorSpace_Base.h"
#include "SkEndian.h"
#include "SkOnce.h"
@@ -1208,3 +1209,17 @@ sk_sp<SkData> SkColorSpace_Base::writeToICC() const {
// the client calls again?
return SkData::MakeFromMalloc(profile.release(), kICCProfileSize);
}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool SkColorSpacePriv::EQ(SkColorSpace* a, SkColorSpace* b) {
+ if (!a) {
+ return !b;
+ }
+ if (!b) {
+ return false;
+ }
+ // TODO: could have an approx EQ where we compare gamma and xyz for a near-match, since this
+ // operator is called to detect when they're close enough for a "fast-case"
+ return a == b;
msarett 2016/06/20 19:41:05 So this will only work when both are sRGB or Adobe
reed1 2016/06/20 21:05:53 Removed
+}

Powered by Google App Engine
This is Rietveld 408576698