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

Unified Diff: src/core/SkColorSpace_Base.h

Issue 2097553002: Add support for 3D colorLUTs to SkColorXform (Closed) Base URL: https://skia.googlesource.com/skia.git@lovedefaultxform
Patch Set: Rebase 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/SkColorSpaceXform.cpp ('k') | no next file » | 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/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h
index 17e59381000724b9a0ea4f5be2343f2d14348ac6..6289b09f500ee393b15842558f5ff361fd0b8b84 100644
--- a/src/core/SkColorSpace_Base.h
+++ b/src/core/SkColorSpace_Base.h
@@ -138,16 +138,18 @@ public:
friend class SkColorSpace;
};
-struct SkColorLookUpTable {
- static const uint8_t kMaxChannels = 16;
-
+struct SkColorLookUpTable : public SkRefCnt {
uint8_t fInputChannels;
uint8_t fOutputChannels;
- uint8_t fGridPoints[kMaxChannels];
+ uint8_t fGridPoints[3];
std::unique_ptr<float[]> fTable;
- SkColorLookUpTable() {
- memset(this, 0, sizeof(struct SkColorLookUpTable));
+ SkColorLookUpTable()
+ : fInputChannels(0)
+ , fOutputChannels(0)
+ , fTable(nullptr)
+ {
+ fGridPoints[0] = fGridPoints[1] = fGridPoints[2] = 0;
}
};
@@ -171,12 +173,12 @@ private:
SkColorSpace_Base(GammaNamed gammaNamed, const SkMatrix44& toXYZ, Named named);
- SkColorSpace_Base(SkColorLookUpTable* colorLUT, sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ,
- sk_sp<SkData> profileData);
+ SkColorSpace_Base(sk_sp<SkColorLookUpTable> colorLUT, sk_sp<SkGammas> gammas,
+ const SkMatrix44& toXYZ, sk_sp<SkData> profileData);
- SkAutoTDelete<SkColorLookUpTable> fColorLUT;
- sk_sp<SkGammas> fGammas;
- sk_sp<SkData> fProfileData;
+ sk_sp<SkColorLookUpTable> fColorLUT;
+ sk_sp<SkGammas> fGammas;
+ sk_sp<SkData> fProfileData;
friend class SkColorSpace;
friend class ColorSpaceXformTest;
« no previous file with comments | « src/core/SkColorSpaceXform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698