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

Unified Diff: src/core/SkColorSpaceXform_Base.h

Issue 2389983002: Refactored SkColorSpace and added in a Lab PCS GM (Closed)
Patch Set: migrated call from SkColorSpace_Base::makeLinearGamma() to SkColorSpace_XYZ::makeLinearGamma() Created 4 years, 2 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') | src/core/SkColorSpace_A2B.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpaceXform_Base.h
diff --git a/src/core/SkColorSpaceXform_Base.h b/src/core/SkColorSpaceXform_Base.h
index c1b9785424eafca700156ac54d3aaa45153d061b..a6486776093dad0ef6de3ae5451a0136bd2a2e38 100644
--- a/src/core/SkColorSpaceXform_Base.h
+++ b/src/core/SkColorSpaceXform_Base.h
@@ -13,6 +13,8 @@
#include "SkColorSpaceXform.h"
#include "SkResourceCache.h"
+class SkColorSpace_XYZ;
+
class SkColorSpaceXform_Base : public SkColorSpaceXform {
public:
static constexpr int kDstGammaTableSize = 1024;
@@ -23,10 +25,10 @@ protected:
private:
static void BuildDstGammaTables(const uint8_t* outGammaTables[3], uint8_t* gammaTableStorage,
- const SkColorSpace* space, bool gammasAreMatching);
+ const SkColorSpace_XYZ* space, bool gammasAreMatching);
friend class SkColorSpaceXform;
- friend class SkColorSpace_Base;
+ friend class SkColorSpace_XYZ;
};
enum SrcGamma {
@@ -54,10 +56,8 @@ protected:
int count, SkAlphaType alphaType) const override;
private:
- SkColorSpaceXform_XYZ(SkColorSpace* srcSpace, const SkMatrix44& srcToDst,
- SkColorSpace* dstSpace);
-
- sk_sp<SkColorLookUpTable> fColorLUT;
+ SkColorSpaceXform_XYZ(SkColorSpace_XYZ* srcSpace, const SkMatrix44& srcToDst,
+ SkColorSpace_XYZ* dstSpace);
// Contain pointers into storage or pointers into precomputed tables.
const float* fSrcGammaTables[3];
@@ -68,10 +68,10 @@ private:
float fSrcToDst[16];
friend class SkColorSpaceXform;
- friend std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space);
+ friend std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace_XYZ* space);
};
// For testing. Bypasses opts for when src and dst color spaces are equal.
-std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space);
+std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace_XYZ* space);
#endif
« no previous file with comments | « src/core/SkColorSpaceXform.cpp ('k') | src/core/SkColorSpace_A2B.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698