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; |
} |