aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-09-07 18:33:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-07 18:33:22 +0000
commite5ede4b138e84d05d63c9ab7f426884dc9b4d926 (patch)
treedfbaa75e3d7d3e5e70deed7585419ce2610e9978 /src/gpu/ccpr
parentb3e39f67599adf418215652fe714d3883dd5fd88 (diff)
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>
Diffstat (limited to 'src/gpu/ccpr')
-rw-r--r--src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp11
-rw-r--r--src/gpu/ccpr/GrCoverageCountingPathRenderer.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index 4aff0a918c..2bec4ffeb1 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -39,22 +39,17 @@ GrCoverageCountingPathRenderer::CreateIfSupported(const GrCaps& caps) {
new GrCoverageCountingPathRenderer : nullptr);
}
-GrPathRenderer::CanDrawPath
-GrCoverageCountingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
+bool GrCoverageCountingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
if (!args.fShape->style().isSimpleFill() ||
args.fShape->inverseFilled() ||
args.fViewMatrix->hasPerspective() ||
GrAAType::kCoverage != args.fAAType) {
- return CanDrawPath::kNo;
+ return false;
}
SkPath path;
args.fShape->asPath(&path);
- if (SkPathPriv::ConicWeightCnt(path)) {
- return CanDrawPath::kNo;
- }
-
- return CanDrawPath::kYes;
+ return !SkPathPriv::ConicWeightCnt(path);
}
bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) {
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
index d7617281a2..e1e28a40bc 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
@@ -38,7 +38,7 @@ public:
StencilSupport onGetStencilSupport(const GrShape&) const override {
return GrPathRenderer::kNoSupport_StencilSupport;
}
- CanDrawPath onCanDrawPath(const CanDrawPathArgs& args) const override;
+ bool onCanDrawPath(const CanDrawPathArgs& args) const override;
bool onDrawPath(const DrawPathArgs&) final;
// GrOnFlushCallbackObject overrides.