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

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

Issue 1761523002: Retract GrDrawTarget and GrPipelineBuilder a bit more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/gpu/GrTracing.h ('k') | src/gpu/effects/GrDashingEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDashLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index 902dca6d862a02aa80517d2529a6142e8ab9ab56..9ee27c78ddfc2bbf8ad10812b910bbac9c90ef3e 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -20,8 +20,19 @@ 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();
SkPoint pts[2];
SkAssertResult(args.fPath->isLine(pts));
- return GrDashingEffect::DrawDashLine(args.fTarget, *args.fPipelineBuilder, args.fColor,
- *args.fViewMatrix, pts, args.fAntiAlias, *args.fStroke);
+ SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor,
+ *args.fViewMatrix,
+ pts,
+ args.fAntiAlias,
+ msaaIsEnabled,
+ *args.fStroke));
+ if (!batch) {
+ return false;
+ }
+
+ args.fTarget->drawBatch(*args.fPipelineBuilder, batch);
+ return true;
}
« no previous file with comments | « src/gpu/GrTracing.h ('k') | src/gpu/effects/GrDashingEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698