Index: src/gpu/GrColorSpaceXform.cpp |
diff --git a/src/gpu/GrColorSpaceXform.cpp b/src/gpu/GrColorSpaceXform.cpp |
index 3380b0f39079a7e3b4eef68aa2b4dba10a8334c0..d4faaaffd1650a3d35043160a0569b9db48b8146 100644 |
--- a/src/gpu/GrColorSpaceXform.cpp |
+++ b/src/gpu/GrColorSpaceXform.cpp |
@@ -59,6 +59,18 @@ sk_sp<GrColorSpaceXform> GrColorSpaceXform::Make(SkColorSpace* src, SkColorSpace |
return sk_make_sp<GrColorSpaceXform>(srcToDst); |
} |
+bool GrColorSpaceXform::Equals(const GrColorSpaceXform* a, const GrColorSpaceXform* b) { |
+ if (a == b) { |
+ return true; |
+ } |
+ |
+ if (!a || !b) { |
+ return false; |
+ } |
+ |
+ return a->fSrcToDst == b->fSrcToDst; |
+} |
+ |
GrColor4f GrColorSpaceXform::apply(const GrColor4f& srcColor) { |
GrColor4f result; |
fSrcToDst.mapScalars(srcColor.fRGBA, result.fRGBA); |