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>
diff --git a/src/shaders/SkLocalMatrixShader.cpp b/src/shaders/SkLocalMatrixShader.cpp
index 78110f5..ca99af1 100644
--- a/src/shaders/SkLocalMatrixShader.cpp
+++ b/src/shaders/SkLocalMatrixShader.cpp
@@ -15,8 +15,13 @@
#if SK_SUPPORT_GPU
std::unique_ptr<GrFragmentProcessor> SkLocalMatrixShader::asFragmentProcessor(
const GrFPArgs& args) const {
+ SkMatrix tmp = this->getLocalMatrix();
+ if (args.fLocalMatrix) {
+ tmp.preConcat(*args.fLocalMatrix);
+ }
return as_SB(fProxyShader)
- ->asFragmentProcessor(args.makeWithPreLocalMatrix(this->getLocalMatrix()));
+ ->asFragmentProcessor(GrFPArgs(args.fContext, args.fViewMatrix, &tmp,
+ args.fFilterQuality, args.fDstColorSpaceInfo));
}
#endif