Index: src/core/SkColorSpace_Base.h |
diff --git a/src/core/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h |
index fc4f665e688c66f3aa3016d9f43615a45c573182..5911c85ed40e3c1c786b17e95c1eeacd667a2a08 100644 |
--- a/src/core/SkColorSpace_Base.h |
+++ b/src/core/SkColorSpace_Base.h |
@@ -81,6 +81,18 @@ struct SkGammaCurve { |
, fE(0.0f) |
, fF(0.0f) |
{} |
+ |
+ inline bool operator==(const SkGammaCurve& that) const { |
+ return (this->fNamed == that.fNamed) && (this->fValue == that.fValue) && |
+ (this->fTableSize == that.fTableSize) && (this->fTable == that.fTable) && |
+ (this->fG == that.fG) && (this->fA == that.fA) && (this->fB == that.fB) && |
+ (this->fC == that.fC) && (this->fD == that.fD) && (this->fE == that.fE) && |
+ (this->fF == that.fF); |
+ } |
+ |
+ inline bool operator!=(const SkGammaCurve& that) const { |
+ return !(*this == that); |
+ } |
}; |
struct SkGammas : public SkRefCnt { |
@@ -148,7 +160,7 @@ public: |
static sk_sp<SkColorSpace> NewRGB(float gammas[3], const SkMatrix44& toXYZD50); |
- const sk_sp<SkGammas>& gammas() const { return fGammas; } |
+ SkGammas* gammas() const { return fGammas.get(); } |
SkColorLookUpTable* colorLUT() const { return fColorLUT.get(); } |
@@ -173,6 +185,7 @@ private: |
sk_sp<SkData> fProfileData; |
friend class SkColorSpace; |
+ friend class ColorSpaceXformTest; |
typedef SkColorSpace INHERITED; |
}; |