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

Unified Diff: src/core/SkColorSpace.h

Issue 1925753002: Parse A2B0 tag on ICC profiles (Closed) Base URL: https://skia.googlesource.com/skia.git@sanity-icc-parse
Patch Set: Explicit move constructor for MSVS 2013 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 | « no previous file | 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 777be9da2b4ebaae9e918197517775adb2a82777..e14ab1c3c03aa72990e6b9c02de409d6b1a4d4a4 100644
--- a/src/core/SkColorSpace.h
+++ b/src/core/SkColorSpace.h
@@ -35,6 +35,27 @@ struct SkFloat3x3 {
void dump() const;
};
+struct SkColorLookUpTable {
+ static const uint8_t kMaxChannels = 16;
+
+ uint8_t fInputChannels;
+ uint8_t fOutputChannels;
+ uint8_t fGridPoints[kMaxChannels];
+ std::unique_ptr<float[]> fTable;
+
+ SkColorLookUpTable() {
+ memset(this, 0, sizeof(struct SkColorLookUpTable));
+ }
+
+ SkColorLookUpTable(SkColorLookUpTable&& that)
+ : fInputChannels(that.fInputChannels)
+ , fOutputChannels(that.fOutputChannels)
+ , fTable(std::move(that.fTable))
+ {
+ memcpy(fGridPoints, that.fGridPoints, kMaxChannels);
+ }
+};
+
struct SkPM4f;
void SkApply3x3ToPM4f(const SkFloat3x3&, const SkPM4f src[], SkPM4f dst[], int count);
@@ -57,6 +78,7 @@ public:
SkFloat3 gamma() const { return fGamma; }
SkFloat3x3 xyz() const { return fToXYZD50; }
+ SkFloat3 xyzOffset() const { return fToXYZOffset; }
Named named() const { return fNamed; }
uint32_t uniqueID() const { return fUniqueID; }
@@ -75,14 +97,19 @@ public:
static void Test();
void dump() const;
-protected:
- SkColorSpace(const SkFloat3x3& toXYZ, const SkFloat3& gamma, Named);
-
private:
- const SkFloat3x3 fToXYZD50;
- const SkFloat3 fGamma;
- const uint32_t fUniqueID;
- const Named fNamed;
+ SkColorSpace(const SkFloat3& gamma, const SkFloat3x3& toXYZ, Named);
+
+ SkColorSpace(SkColorLookUpTable colorLUT, const SkFloat3& gamma, const SkFloat3x3& toXYZ,
+ const SkFloat3& toXYZOffset);
+
+ const SkColorLookUpTable fColorLUT;
+ const SkFloat3 fGamma;
+ const SkFloat3x3 fToXYZD50;
+ const SkFloat3 fToXYZOffset;
+
+ const uint32_t fUniqueID;
+ const Named fNamed;
};
#endif
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698