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

Unified Diff: src/gpu/batches/GrDashLinePathRenderer.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/GrDashLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index 165464f0ad189406ef1c0f1f100378e993629a91..1763f9511692c449298b6ce45aa303696b9d959e 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -8,6 +8,7 @@
#include "GrDashLinePathRenderer.h"
#include "GrGpu.h"
+#include "GrAuditTrail.h"
#include "effects/GrDashingEffect.h"
bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
@@ -19,8 +20,9 @@ bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
}
bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
- GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrDashLinePathRenderer::onDrawPath");
- bool msaaIsEnabled = args.fPipelineBuilder->getRenderTarget()->isUnifiedMultisampled();
+ GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
+ "GrDashLinePathRenderer::onDrawPath");
+ bool msaaIsEnabled = args.fDrawContext->isUnifiedMultisampled();
SkPoint pts[2];
SkAssertResult(args.fPath->isLine(pts));
SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor,
@@ -33,6 +35,10 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
return false;
}
- args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch);
+ GrPipelineBuilder pipelineBuilder(*args.fPaint, msaaIsEnabled);
+ 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