diff options
author | Florin Malita <fmalita@chromium.org> | 2018-02-07 10:05:53 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-07 15:56:39 +0000 |
commit | 7558e4dbecac109c5e971f5d028b847070e773e7 (patch) | |
tree | ccbe381c9c466a55915d3988e745b0c38bc74049 /src | |
parent | a4ead65e2c80b6e649f31e28e8fa116aca83fad4 (diff) |
Refactor explicit inverse calculation in SkImageShader::onAppendStages()
We have SkShaderBase::computeTotalInverse() which does exactly that.
Change-Id: I77695f9261d700c3ac25fe94250b798e6edfc25d
Reviewed-on: https://skia-review.googlesource.com/105000
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/shaders/SkImageShader.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp index 22c3b7633b..1f77158206 100644 --- a/src/shaders/SkImageShader.cpp +++ b/src/shaders/SkImageShader.cpp @@ -282,12 +282,8 @@ bool SkImageShader::onAppendStages(const StageRec& rec) const { SkRasterPipeline* p = rec.fPipeline; SkArenaAlloc* alloc = rec.fAlloc; - auto matrix = SkMatrix::Concat(rec.fCTM, this->getLocalMatrix()); - if (rec.fLocalM) { - matrix.preConcat(*rec.fLocalM); - } - - if (!matrix.invert(&matrix)) { + SkMatrix matrix; + if (!this->computeTotalInverse(rec.fCTM, rec.fLocalM, &matrix)) { return false; } auto quality = rec.fPaint.getFilterQuality(); |