Index: src/core/SkColorSpace_Base.h |
diff --git a/src/core/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h |
index 5c36e441ea530dd3820d393ac21c9c38c496085b..31f96dd7f9dde6552acd430b04071c9ad7cd4eaa 100644 |
--- a/src/core/SkColorSpace_Base.h |
+++ b/src/core/SkColorSpace_Base.h |
@@ -12,6 +12,13 @@ |
#include "SkData.h" |
#include "SkTemplates.h" |
+enum SkGammaNamed : uint8_t { |
+ kLinear_SkGammaNamed, |
+ kSRGB_SkGammaNamed, |
+ k2Dot2Curve_SkGammaNamed, |
+ kNonStandard_SkGammaNamed, |
+}; |
+ |
struct SkGammas : SkRefCnt { |
// There are four possible representations for gamma curves. kNone_Type is used |
@@ -59,7 +66,7 @@ struct SkGammas : SkRefCnt { |
this->fTable.fSize == that.fTable.fSize; |
} |
- SkColorSpace::GammaNamed fNamed; |
+ SkGammaNamed fNamed; |
float fValue; |
Table fTable; |
size_t fParamOffset; |
@@ -176,6 +183,7 @@ public: |
static sk_sp<SkColorSpace> NewRGB(const float gammas[3], const SkMatrix44& toXYZD50); |
+ SkGammaNamed gammaNamed() const { return fGammaNamed; } |
const SkGammas* gammas() const { return fGammas.get(); } |
const SkColorLookUpTable* colorLUT() const { return fColorLUT.get(); } |
@@ -191,14 +199,15 @@ private: |
*/ |
sk_sp<SkData> writeToICC() const; |
- static sk_sp<SkColorSpace> NewRGB(GammaNamed gammaNamed, const SkMatrix44& toXYZD50); |
+ static sk_sp<SkColorSpace> NewRGB(SkGammaNamed gammaNamed, const SkMatrix44& toXYZD50); |
- SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ); |
+ SkColorSpace_Base(SkGammaNamed gammaNamed, const SkMatrix44& toXYZ); |
- SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, GammaNamed gammaNamed, |
+ SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, SkGammaNamed gammaNamed, |
sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ, sk_sp<SkData> profileData); |
sk_sp<SkColorLookUpTable> fColorLUT; |
+ const SkGammaNamed fGammaNamed; |
sk_sp<SkGammas> fGammas; |
sk_sp<SkData> fProfileData; |