Move pipeline handling out of GrMeshDrawOp.
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp.
The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline.
Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706
Reviewed-on: https://skia-review.googlesource.com/11002
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 9f170ff..eda8906 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -46,7 +46,7 @@
}
SkPoint pts[2];
SkAssertResult(args.fShape->asLine(pts, nullptr));
- std::unique_ptr<GrMeshDrawOp> op = GrDashOp::MakeDashLineOp(
+ std::unique_ptr<GrLegacyMeshDrawOp> op = GrDashOp::MakeDashLineOp(
args.fPaint.getColor(), *args.fViewMatrix, pts, aaMode, args.fShape->style());
if (!op) {
return false;
@@ -55,6 +55,6 @@
GrPipelineBuilder pipelineBuilder(std::move(args.fPaint), args.fAAType);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
- args.fRenderTargetContext->addMeshDrawOp(pipelineBuilder, *args.fClip, std::move(op));
+ args.fRenderTargetContext->addLegacyMeshDrawOp(pipelineBuilder, *args.fClip, std::move(op));
return true;
}