Index: src/core/SkColorSpace_Base.h |
diff --git a/src/core/SkColorSpacePriv.h b/src/core/SkColorSpace_Base.h |
similarity index 70% |
rename from src/core/SkColorSpacePriv.h |
rename to src/core/SkColorSpace_Base.h |
index 47fab647ff19ac5b13564cc0e7b8735a043f6cd0..b2a46f193f637e1746b68d902bfdfd66b9e9739e 100644 |
--- a/src/core/SkColorSpacePriv.h |
+++ b/src/core/SkColorSpace_Base.h |
@@ -5,8 +5,10 @@ |
* found in the LICENSE file. |
*/ |
-#ifndef SkColorSpacePriv_DEFINED |
-#define SkColorSpacePriv_DEFINED |
+#ifndef SkColorSpace_Base_DEFINED |
+#define SkColorSpace_Base_DEFINED |
+ |
+#include "SkColorSpace.h" |
struct SkGammaCurve { |
bool isValue() const { |
@@ -86,4 +88,30 @@ struct SkColorLookUpTable { |
} |
}; |
+class SkColorSpace_Base : public SkColorSpace { |
+public: |
+ |
+ SkGammas* gammas() const { return fGammas.get(); } |
+ |
+private: |
+ |
+ SkColorSpace_Base(sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ, Named); |
+ |
+ SkColorSpace_Base(sk_sp<SkGammas> gammas, GammaNamed gammaNamed, const SkMatrix44& toXYZ, |
+ Named); |
+ |
+ SkColorSpace_Base(SkColorLookUpTable* colorLUT, sk_sp<SkGammas> gammas, |
+ const SkMatrix44& toXYZ); |
+ |
+ SkAutoTDelete<SkColorLookUpTable> fColorLUT; |
+ sk_sp<SkGammas> fGammas; |
+ |
+ friend class SkColorSpace; |
+ typedef SkColorSpace INHERITED; |
+}; |
+ |
+static inline SkColorSpace_Base* as_CSB(SkColorSpace* colorSpace) { |
+ return static_cast<SkColorSpace_Base*>(colorSpace); |
+} |
+ |
#endif |