Remove all instances of incorrect coverage with DMSAA
Here we pivot and handle DMSAA differently depending on platform:
1) Desktop GL and EXT_multisample_compatibility: Here it's easy to use
all our existing coverage ops because we can just call
glDisable(GL_MULTISAMPLE). So we only trigger MSAA for paths and
use the coverage ops for everything else with MSAA disabled.
2) EXT_multisampled_render_to_to_texture (86% adoption on Android):
The assumption here is that MSAA is almost free. So we just allow
MSAA to be triggered often and don't worry about it.
Devices that neither support #1 nor #2 just don't get DMSAA for now.
Bug: skia:11396
Change-Id: I53ad840216ea6d88ae69eece6f7a062f9e82dad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421019
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index dfa2967..eda3392 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -37,15 +37,9 @@
aaMode = GrDashOp::AAMode::kNone;
break;
case GrAAType::kMSAA:
- if (args.fSurfaceDrawContext->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;
- }
+ // 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;