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

Unified Diff: src/core/SkColorSpaceXform.h

Issue 2084673002: Use a table-based implementation of SkDefaultXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: quickEquals() 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 | « no previous file | 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 e6abdbb9924819834d2d345cc733f61b4769b855..583386a8a2e0bc655828aa6497a7ba2267c0a97d 100644
--- a/src/core/SkColorSpaceXform.h
+++ b/src/core/SkColorSpaceXform.h
@@ -57,15 +57,22 @@ public:
void xform_RGB1_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);
+ SkDefaultXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst,
+ const sk_sp<SkColorSpace>& dstSpace);
- sk_sp<SkGammas> fSrcGammas;
- const SkMatrix44 fSrcToDst;
- sk_sp<SkGammas> fDstGammas;
+ static constexpr int kDstGammaTableSize = 1024;
+
+ // May contain pointers into storage or pointers into precomputed tables.
+ const float* fSrcGammaTables[3];
+ float fSrcGammaTableStorage[3 * 256];
+
+ const SkMatrix44 fSrcToDst;
+
+ // May contain pointers into storage or pointers into precomputed tables.
+ const uint8_t* fDstGammaTables[3];
+ uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize];
friend class SkColorSpaceXform;
- friend class ColorSpaceXformTest;
};
#endif
« no previous file with comments | « no previous file | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698