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

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: fix redirect header 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
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpace.h
diff --git a/src/core/SkColorSpace.h b/src/core/SkColorSpace.h
index a1ccf13fe0c61af76922e50c9f2d9ac538b260a2..6498941d7dcb795e08587d159e087df4d7e38ca7 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;
-};
-
class SkColorSpace : public SkRefCnt {
private:
struct SkGammaCurve {
@@ -117,17 +112,16 @@ 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, SkGammas gammas);
+ static sk_sp<SkColorSpace> NewRGB(const SkMatrix44& toXYZD50, SkGammas gammas);
static sk_sp<SkColorSpace> NewNamed(Named);
static sk_sp<SkColorSpace> NewICC(const void*, size_t);
const SkGammas& gammas() const { return fGammas; }
- 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; }
@@ -140,18 +134,17 @@ private:
uint32_t outputChannels, const uint8_t* src, size_t len);
- static bool LoadA2B0(SkColorLookUpTable* colorLUT, SkGammas* gammas, SkFloat3x3* toXYZ,
- SkFloat3* toXYZOffset, const uint8_t* src, size_t len);
+ static bool LoadA2B0(SkColorLookUpTable* colorLUT, SkGammas* gammas, SkMatrix44* toXYZ,
+ const uint8_t* src, size_t len);
- SkColorSpace(SkGammas gammas, const SkFloat3x3& toXYZ, Named);
+ SkColorSpace(SkGammas gammas, const SkMatrix44& toXYZ, Named);
SkColorSpace(SkColorLookUpTable colorLUT, SkGammas gammas,
- const SkFloat3x3& toXYZ, const SkFloat3& toXYZOffset);
+ const SkMatrix44& toXYZ);
const SkColorLookUpTable fColorLUT;
const SkGammas fGammas;
- 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698