Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/gpu/batches/GrAAHairLinePathRenderer.cpp

Issue 2035823002: Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/batches/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 556e2514e2b0e22f80d7d0ed64a4c2f556e73cd3..a16313823597e23525ea05d496ae7f0e2e54d740 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -963,14 +963,21 @@ static GrDrawBatch* create_hairline_batch(GrColor color,
}
bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
- GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),"GrAAHairlinePathRenderer::onDrawPath");
+ GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
+ "GrAAHairlinePathRenderer::onDrawPath");
SkIRect devClipBounds;
- GrRenderTarget* rt = args.fPipelineBuilder->getRenderTarget();
- args.fClip->getConservativeBounds(rt->width(), rt->height(), &devClipBounds);
+ args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawContext->height(),
+ &devClipBounds);
SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fColor, *args.fViewMatrix, *args.fPath,
*args.fStyle, devClipBounds));
- args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch);
+
+ GrPipelineBuilder pipelineBuilder(*args.fPaint,
+ args.fDrawContext->isStencilBufferMultisampled());
+ pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget());
+ pipelineBuilder.setUserStencil(args.fUserStencilSettings);
+
+ args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698