aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrDefaultPathRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ops/GrDefaultPathRenderer.cpp')
-rw-r--r--src/gpu/ops/GrDefaultPathRenderer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index 270dc09251..e76ded3d5a 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -557,14 +557,15 @@ bool GrDefaultPathRenderer::internalDrawPath(GrRenderTargetContext* renderTarget
} else {
std::unique_ptr<GrDrawOp> op =
DefaultPathOp::Make(paint.getColor(), path, srcSpaceTol, newCoverage,
-
viewMatrix, isHairline, devBounds);
- GrPipelineBuilder pipelineBuilder(GrPaint::MoveOrNew(paint, lastPassIsBounds), aaType);
+ bool stencilPass = stencilOnly || passCount > 1;
+ GrPaint::MoveOrNew passPaint(paint, stencilPass);
+ if (stencilPass) {
+ passPaint.paint().setXPFactory(GrDisableColorXPFactory::Get());
+ }
+ GrPipelineBuilder pipelineBuilder(std::move(passPaint), aaType);
pipelineBuilder.setDrawFace(drawFace[p]);
pipelineBuilder.setUserStencil(passes[p]);
- if (passCount > 1) {
- pipelineBuilder.setDisableColorXPFactory();
- }
renderTargetContext->addDrawOp(pipelineBuilder, clip, std::move(op));
}
}