Use coverage AA for dmsaa dashes

Total DMSAA Multisample Render Passes: 220 -> 190

Bug: skia:11396
Change-Id: Ifac3989d042fa1adc14a01625d1976ae1454b646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403976
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 417bc84..a33f2ec 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -37,9 +37,15 @@
             aaMode = GrDashOp::AAMode::kNone;
             break;
         case GrAAType::kMSAA:
-            // In this mode we will use aa between dashes but the outer border uses MSAA. Otherwise,
-            // we can wind up with external edges antialiased and internal edges unantialiased.
-            aaMode = GrDashOp::AAMode::kCoverageWithMSAA;
+            if (args.fRenderTargetContext->canUseDynamicMSAA()) {
+                // In DMSAA we avoid using MSAA, in order to reduce the number of MSAA triggers.
+                aaMode = GrDashOp::AAMode::kCoverage;
+            } else {
+                // In this mode we will use aa between dashes but the outer border uses MSAA.
+                // Otherwise, we can wind up with external edges antialiased and internal edges
+                // unantialiased.
+                aaMode = GrDashOp::AAMode::kCoverageWithMSAA;
+            }
             break;
         case GrAAType::kCoverage:
             aaMode = GrDashOp::AAMode::kCoverage;