diff options
author | brianosman <brianosman@google.com> | 2016-07-27 05:25:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-27 05:25:26 -0700 |
commit | 9f97882322929ee39405acb44cbf155854b38091 (patch) | |
tree | ed460bed4407d557dedc54fd57ecf2f9c6c2dc7e /include/gpu | |
parent | 39683791cc8142ff5e614b567e309cf920b32358 (diff) |
Simplify color space xform storage and usage (float[] vs. SkMatrix44)
Public API is really just internal.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185533005
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2185533005
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrColorSpaceXform.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/gpu/GrColorSpaceXform.h b/include/gpu/GrColorSpaceXform.h index ea90739fd2..177230c87c 100644 --- a/include/gpu/GrColorSpaceXform.h +++ b/include/gpu/GrColorSpaceXform.h @@ -8,24 +8,25 @@ #ifndef GrColorSpaceXform_DEFINED #define GrColorSpaceXform_DEFINED -#include "SkMatrix44.h" #include "SkRefCnt.h" class SkColorSpace; +class SkMatrix44; /** * Represents a color gamut transformation (as a 4x4 color matrix) */ class GrColorSpaceXform : public SkRefCnt { public: - GrColorSpaceXform(const SkMatrix44& srcToDst) : fSrcToDst(srcToDst) {} + GrColorSpaceXform(const SkMatrix44& srcToDst); static sk_sp<GrColorSpaceXform> Make(SkColorSpace* src, SkColorSpace* dst); - const SkMatrix44& srcToDst() { return fSrcToDst; } + const float* srcToDst() { return fSrcToDst; } private: - SkMatrix44 fSrcToDst; + // We store the column-major form of the srcToDst matrix, for easy uploading to uniforms + float fSrcToDst[16]; }; #endif |