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

Unified Diff: src/core/SkColorSpace.h

Issue 1943833002: return 4x4 matrix from SkColorSpace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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.h
diff --git a/src/core/SkColorSpace.h b/src/core/SkColorSpace.h
index 2b3b15fe95576c33f5def8e4a341c5797a9bac30..4e7246fd2df6cd92c35179c5794c640bfaaa0175 100644
--- a/src/core/SkColorSpace.h
+++ b/src/core/SkColorSpace.h
@@ -22,6 +22,7 @@
//
#include "SkRefCnt.h"
+#include "SkMatrix44.h"
struct SkFloat3 {
float fVec[3];
@@ -29,12 +30,6 @@ struct SkFloat3 {
void dump() const;
};
-struct SkFloat3x3 {
- float fMat[9];
-
- void dump() const;
-};
-
struct SkColorLookUpTable {
static const uint8_t kMaxChannels = 16;
@@ -64,30 +59,27 @@ public:
};
/**
- * Return a colorspace instance, given a 3x3 transform from linear_RGB to D50_XYZ
+ * Return a colorspace instance, given a transform from linear_RGB to D50_XYZ
* and the src-gamma, return a ColorSpace
*/
- static sk_sp<SkColorSpace> NewRGB(const SkFloat3x3& toXYZD50, const SkFloat3& gamma);
+ static sk_sp<SkColorSpace> NewRGB(const SkMatrix44& toXYZD50, const SkFloat3& gamma);
static sk_sp<SkColorSpace> NewNamed(Named);
static sk_sp<SkColorSpace> NewICC(const void*, size_t);
SkFloat3 gamma() const { return fGamma; }
- SkFloat3x3 xyz() const { return fToXYZD50; }
- SkFloat3 xyzOffset() const { return fToXYZOffset; }
+ SkMatrix44 xyz() const { return fToXYZD50; }
Named named() const { return fNamed; }
uint32_t uniqueID() const { return fUniqueID; }
private:
- SkColorSpace(const SkFloat3& gamma, const SkFloat3x3& toXYZ, Named);
+ SkColorSpace(const SkFloat3& gamma, const SkMatrix44& toXYZ, Named);
- SkColorSpace(SkColorLookUpTable colorLUT, const SkFloat3& gamma, const SkFloat3x3& toXYZ,
- const SkFloat3& toXYZOffset);
+ SkColorSpace(SkColorLookUpTable colorLUT, const SkFloat3& gamma, const SkMatrix44& toXYZ);
const SkColorLookUpTable fColorLUT;
const SkFloat3 fGamma;
- const SkFloat3x3 fToXYZD50;
- const SkFloat3 fToXYZOffset;
+ const SkMatrix44 fToXYZD50;
const uint32_t fUniqueID;
const Named fNamed;
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace.cpp » ('j') | tests/ColorSpaceTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698