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

Unified Diff: src/core/SkColorSpaceXform.h

Issue 2177173003: Delete SkDefaultXform, handle edge cases in SkColorSpaceXform_Base (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use less space on Google3 Created 4 years, 5 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 0947e0848e5d46364bf0d59b8929446fc828f1a9..0a5b35c489b4d24c87cb9f2c2eaffd8c1d9bd5e5 100644
--- a/src/core/SkColorSpaceXform.h
+++ b/src/core/SkColorSpaceXform.h
@@ -39,47 +39,17 @@ public:
};
template <SkColorSpace::GammaNamed Dst>
-class SkFastXform : public SkColorSpaceXform {
+class SkColorSpaceXform_Base : public SkColorSpaceXform {
public:
void applyTo8888(SkPMColor* dst, const RGBA32* src, int len) const override;
void applyToF16(RGBAF16* dst, const RGBA32* src, int len) const override;
-private:
- SkFastXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst,
- const sk_sp<SkColorSpace>& dstSpace);
-
- 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[16];
-
- // May contain pointers into storage or pointers into precomputed tables.
- const uint8_t* fDstGammaTables[3];
- uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize];
-
- friend class SkColorSpaceXform;
-};
-
-/**
- * Works for any valid src and dst profiles.
- */
-// TODO (msarett):
-// Merge with SkFastXform and delete this. SkFastXform can almost do everything that
-// this does.
-class SkDefaultXform : public SkColorSpaceXform {
-public:
-
- void applyTo8888(SkPMColor* dst, const RGBA32* src, int len) const override;
- void applyToF16(RGBAF16* dst, const RGBA32* src, int len) const override;
+ static constexpr int kDstGammaTableSize = 1024;
- static constexpr int kDstGammaTableSize = 1024;
private:
- SkDefaultXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst,
- const sk_sp<SkColorSpace>& dstSpace);
+ SkColorSpaceXform_Base(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst,
+ const sk_sp<SkColorSpace>& dstSpace);
sk_sp<SkColorLookUpTable> fColorLUT;
@@ -87,7 +57,7 @@ private:
const float* fSrcGammaTables[3];
float fSrcGammaTableStorage[3 * 256];
- const SkMatrix44 fSrcToDst;
+ float fSrcToDst[16];
// May contain pointers into storage or pointers into precomputed tables.
const uint8_t* fDstGammaTables[3];
« 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