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

Unified Diff: src/core/SkColorSpaceXform.h

Issue 2038823002: Add SkDefaultXform as a catch-all to handle color conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Include SkColorSpace_Base 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
« no previous file with comments | « src/core/SkColorSpace.cpp ('k') | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpaceXform.h
diff --git a/src/core/SkColorSpaceXform.h b/src/core/SkColorSpaceXform.h
index c3010f0ccac99c00867c4e8eea7e7ae2d3b330ce..d54d1b812d2885a674078ba3ab3468107481ffd8 100644
--- a/src/core/SkColorSpaceXform.h
+++ b/src/core/SkColorSpaceXform.h
@@ -9,8 +9,9 @@
#define SkColorSpaceXform_DEFINED
#include "SkColorSpace.h"
+#include "SkColorSpace_Base.h"
-class SkColorSpaceXform {
+class SkColorSpaceXform : SkNoncopyable {
public:
/**
@@ -48,4 +49,24 @@ private:
friend class SkColorSpaceXform;
};
+/**
+ * Works for any valid src and dst profiles.
+ */
+class SkDefaultXform : public SkColorSpaceXform {
+public:
+
+ void xform_RGBA_8888(uint32_t* dst, const uint32_t* src, uint32_t len) const override;
+
+private:
+ SkDefaultXform(const sk_sp<SkGammas>& srcGammas, const SkMatrix44& srcToDst,
+ const sk_sp<SkGammas>& dstGammas);
+
+ sk_sp<SkGammas> fSrcGammas;
+ const SkMatrix44 fSrcToDst;
+ sk_sp<SkGammas> fDstGammas;
+
+ friend class SkColorSpaceXform;
+ friend class ColorSpaceXformTest;
+};
+
#endif
« no previous file with comments | « src/core/SkColorSpace.cpp ('k') | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698