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

Unified Diff: src/core/SkColorSpace_Base.h

Issue 1996973002: Make SkColorSpace a public API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove SkColorSpace.h from gyp Created 4 years, 7 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
« no previous file with comments | « src/core/SkColorSpacePriv.h ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/core/SkColorSpacePriv.h ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698