Index: src/gpu/batches/GrDashLinePathRenderer.cpp |
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp |
index 6a054589be0bfff26f85d18b03ac8775c78348bb..51ef0528aa1634cf72e9820da25bf0a9e7b65904 100644 |
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp |
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp |
@@ -23,13 +23,22 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) { |
GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), |
"GrDashLinePathRenderer::onDrawPath"); |
bool msaaIsEnabled = args.fDrawContext->isUnifiedMultisampled(); |
+ GrDashingEffect::AAMode aaMode; |
+ if (msaaIsEnabled) { |
+ // We ignore args.fAntiAlias here and force anti aliasing when using MSAA. Otherwise, |
+ // we can wind up with external edges antialiased and internal edges unantialiased. |
+ aaMode = GrDashingEffect::AAMode::kCoverageWithMSAA; |
+ } else if (args.fAntiAlias) { |
+ aaMode = GrDashingEffect::AAMode::kCoverage; |
+ } else { |
+ aaMode = GrDashingEffect::AAMode::kNone; |
+ } |
SkPoint pts[2]; |
SkAssertResult(args.fPath->isLine(pts)); |
SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor, |
*args.fViewMatrix, |
pts, |
- args.fAntiAlias, |
- msaaIsEnabled, |
+ aaMode, |
*args.fStyle)); |
if (!batch) { |
return false; |