Revert "Improve GrPathRendererChain heuristics"
This reverts commit 60f42494f5d45c38e260ce089cdddfb600f799b2.
Reason for revert: breaking gold
Original change's description:
> Improve GrPathRendererChain heuristics
>
> Changes GrPathRenderer::canDrawPath to return a 'CanDrawPath' enum,
> which contains a new kAsBackup value that means "I'm better than SW,
> but give the path renderers below me a chance first."
>
> Bug: skia:
> Change-Id: I45aac5462ca1bc0bc839eb1c315db9493901a07e
> Reviewed-on: https://skia-review.googlesource.com/42222
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,brianosman@google.com,csmartdalton@google.com,senorblanco@google.com
Change-Id: I46020dbd56b6f6b88668894285b9b7b80f89b9a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/43780
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 73c2b3e..38d486c 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -12,22 +12,18 @@
#include "ops/GrDashOp.h"
#include "ops/GrMeshDrawOp.h"
-GrPathRenderer::CanDrawPath
-GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
+bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
SkPoint pts[2];
bool inverted;
if (args.fShape->style().isDashed() && args.fShape->asLine(pts, &inverted)) {
if (args.fAAType == GrAAType::kMixedSamples) {
- return CanDrawPath::kNo;
+ return false;
}
// We should never have an inverse dashed case.
SkASSERT(!inverted);
- if (!GrDashOp::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix)) {
- return CanDrawPath::kNo;
- }
- return CanDrawPath::kYes;
+ return GrDashOp::CanDrawDashLine(pts, args.fShape->style(), *args.fViewMatrix);
}
- return CanDrawPath::kNo;
+ return false;
}
bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {