diff options
author | Florin Malita <fmalita@chromium.org> | 2017-02-10 15:34:27 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-10 21:15:16 +0000 |
commit | 368af4605db18f7197ed3289d2ebdc93bbb5879b (patch) | |
tree | 6b6cf2481e10f0629ec91cc740af446298036e9b /include/core | |
parent | 1fe55dc9fa47a73d470438d6298dc3fa959e4528 (diff) |
More non-invertible shader local matrix guards
Change-Id: Ida9a300420ff1d883e617cdaadb80e88c99ad226
Reviewed-on: https://skia-review.googlesource.com/8333
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkShader.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/core/SkShader.h b/include/core/SkShader.h index 4c264e4741..323d29df4b 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -39,7 +39,6 @@ class GrFragmentProcessor; */ class SK_API SkShader : public SkFlattenable { public: - SkShader(const SkMatrix* localMatrix = NULL); virtual ~SkShader(); /** @@ -467,6 +466,8 @@ public: const SkMatrix& ctm, const SkPaint&) const; protected: + SkShader(const SkMatrix* localMatrix = nullptr); + void flatten(SkWriteBuffer&) const override; bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const; @@ -498,9 +499,7 @@ protected: const SkMatrix* /*local matrix*/) const; private: - // This is essentially const, but not officially so it can be modified in - // constructors. - SkMatrix fLocalMatrix; + const SkMatrix fLocalMatrix; // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer constructor. friend class SkLocalMatrixShader; |