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

Unified Diff: src/core/SkColorSpace_Base.h

Issue 2084673002: Use a table-based implementation of SkDefaultXform (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_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;
};

Powered by Google App Engine
This is Rietveld 408576698