Revert of Fix ClipMaskManager's SW-fallback logic (patchset #4 id:60001 of https://codereview.chromium.org/1421533007/ )
Reason for revert:
Logic may be incorrect
Original issue's description:
> Fix ClipMaskManager's SW-fallback logic
>
>
> 'useSWOnlyPath' was not correctly toggling between stencil and color draws so there was a mismatch with the behavior in createAlphaClipMask (i.e., we were inadvertently rendering some of the elements in a clip using SW but using stenciling for others - precisely what 'useSWOnlyPath' was intended to prevent).
>
> Committed: https://skia.googlesource.com/skia/+/5c3ea4cd3921e8904d4f201bcdedfd5b8a726542
TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1426443008
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index c846dee..b1eb320 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -40,7 +40,7 @@
}
GrPathRenderer* GrPathRendererChain::getPathRenderer(const GrShaderCaps* shaderCaps,
- const GrPipelineBuilder& pipelineBuilder,
+ const GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
const SkPath& path,
const GrStrokeInfo& stroke,
@@ -66,15 +66,15 @@
minStencilSupport = GrPathRenderer::kNoSupport_StencilSupport;
}
- GrPathRenderer::CanDrawPathArgs args;
- args.fShaderCaps = shaderCaps;
- args.fPipelineBuilder = &pipelineBuilder;
- args.fViewMatrix = &viewMatrix;
- args.fPath = &path;
- args.fStroke = &stroke;
- args.fAntiAlias = antiAlias;
for (int i = 0; i < fChain.count(); ++i) {
+ GrPathRenderer::CanDrawPathArgs args;
+ args.fShaderCaps = shaderCaps;
+ args.fPipelineBuilder = pipelineBuilder;
+ args.fViewMatrix = &viewMatrix;
+ args.fPath = &path;
+ args.fStroke = &stroke;
+ args.fAntiAlias = antiAlias;
if (fChain[i]->canDrawPath(args)) {
if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport) {
GrPathRenderer::StencilSupport support =