Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack
This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder.
Split out of:
https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035823002
Review-Url: https://codereview.chromium.org/2035823002
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index ffb206a..191c081 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -995,7 +995,8 @@
};
bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
- GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrAAConvexPathRenderer::onDrawPath");
+ GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
+ "GrAAConvexPathRenderer::onDrawPath");
if (args.fPath->isEmpty()) {
return true;
}
@@ -1006,7 +1007,12 @@
geometry.fPath = *args.fPath;
SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry));
- args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch);
+
+ GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnifiedMultisampled());
+ pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget());
+ pipelineBuilder.setUserStencil(args.fUserStencilSettings);
+
+ args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
return true;