aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders/SkPerlinNoiseShader.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-04-11 12:38:41 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-11 12:38:47 +0000
commitc64ee20e135a336ed775ccb6dec8a87efd19ec02 (patch)
tree661c8d0d3ee64ff31b45548758e3c1dfe4abc81d /src/shaders/SkPerlinNoiseShader.cpp
parent90f09e7853f506808b7dad5c50b60376887277a4 (diff)
Revert "Fix handling of MaskFilter matrices"
This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) Original change's description: > Fix handling of MaskFilter matrices > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > creating pre/post wrapper args > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > sandwich logic. > > 3) update call sites to use the above > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > disambiguate vs. SkShader::makeWithLocalMatrix. > > BUG=skia:7744 > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > Reviewed-on: https://skia-review.googlesource.com/119330 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120340 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/shaders/SkPerlinNoiseShader.cpp')
-rw-r--r--src/shaders/SkPerlinNoiseShader.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp
index 8f6c85a494..6179da3d32 100644
--- a/src/shaders/SkPerlinNoiseShader.cpp
+++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -1394,8 +1394,13 @@ std::unique_ptr<GrFragmentProcessor> SkPerlinNoiseShaderImpl::asFragmentProcesso
const GrFPArgs& args) const {
SkASSERT(args.fContext);
- const auto localMatrix = this->totalLocalMatrix(args.fPreLocalMatrix, args.fPostLocalMatrix);
- const auto matrix = SkMatrix::Concat(*args.fViewMatrix, *localMatrix);
+ SkMatrix localMatrix = this->getLocalMatrix();
+ if (args.fLocalMatrix) {
+ localMatrix.preConcat(*args.fLocalMatrix);
+ }
+
+ SkMatrix matrix = *args.fViewMatrix;
+ matrix.preConcat(localMatrix);
// Either we don't stitch tiles, either we have a valid tile size
SkASSERT(!fStitchTiles || !fTileSize.isEmpty());
@@ -1408,8 +1413,8 @@ std::unique_ptr<GrFragmentProcessor> SkPerlinNoiseShaderImpl::asFragmentProcesso
matrix);
SkMatrix m = *args.fViewMatrix;
- m.setTranslateX(-localMatrix->getTranslateX() + SK_Scalar1);
- m.setTranslateY(-localMatrix->getTranslateY() + SK_Scalar1);
+ m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1);
+ m.setTranslateY(-localMatrix.getTranslateY() + SK_Scalar1);
auto proxyProvider = args.fContext->contextPriv().proxyProvider();
if (fType == kImprovedNoise_Type) {