Index: src/core/SkColorSpaceXform.h |
diff --git a/src/core/SkColorSpaceXform.h b/src/core/SkColorSpaceXform.h |
index 723dea433570690a32850a2fe8c527cb777239e0..e09a7252ba5c376d37a8797d6aa46255cffb333d 100644 |
--- a/src/core/SkColorSpaceXform.h |
+++ b/src/core/SkColorSpaceXform.h |
@@ -34,16 +34,27 @@ public: |
virtual ~SkColorSpaceXform() {} |
}; |
-template <SkColorSpace::GammaNamed Src, SkColorSpace::GammaNamed Dst> |
+template <SkColorSpace::GammaNamed Dst> |
class SkFastXform : public SkColorSpaceXform { |
public: |
void xform_RGB1_8888(uint32_t* dst, const uint32_t* src, uint32_t len) const override; |
private: |
- SkFastXform(const SkMatrix44& srcToDst); |
+ SkFastXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst, |
+ const sk_sp<SkColorSpace>& dstSpace); |
- float fSrcToDst[12]; |
+ static constexpr int kDstGammaTableSize = 1024; |
+ |
+ // May contain pointers into storage or pointers into precomputed tables. |
+ const float* fSrcGammaTables[3]; |
+ float fSrcGammaTableStorage[3 * 256]; |
+ |
+ float fSrcToDst[12]; |
+ |
+ // May contain pointers into storage or pointers into precomputed tables. |
+ const uint8_t* fDstGammaTables[3]; |
+ uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize]; |
friend class SkColorSpaceXform; |
}; |