aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2018-01-23 15:35:05 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 21:05:50 +0000
commita7701e032bcc55a73360aa8d1b53ceef566de991 (patch)
tree35978a47567192e06faa3a044d856d967789a37d
parent37834c85b8c729a24cea4bbbf8cf64298350c04d (diff)
GrTessellator: add a #define for max aa verb count.
We'd like to increase the maximum verb count for the edge-AA tessellating path renderer. In order to protect clients from this change, we allow them to set their own value. Bug:805031 Change-Id: I5d41059a217f059998d418d51fcc8c88464ef4da Reviewed-on: https://skia-review.googlesource.com/98886 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
-rw-r--r--src/gpu/ops/GrTessellatingPathRenderer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/ops/GrTessellatingPathRenderer.cpp b/src/gpu/ops/GrTessellatingPathRenderer.cpp
index 8602d008b2..8eaadf0ac3 100644
--- a/src/gpu/ops/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTessellatingPathRenderer.cpp
@@ -24,6 +24,10 @@
#include <stdio.h>
+#ifndef GR_AA_TESSELLATOR_MAX_VERB_COUNT
+#define GR_AA_TESSELLATOR_MAX_VERB_COUNT 10
+#endif
+
/*
* This path renderer tessellates the path into triangles using GrTessellator, uploads the
* triangles to a vertex buffer, and renders them with a single draw call. It can do screenspace
@@ -147,7 +151,7 @@ GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
if (GrAAType::kCoverage == args.fAAType) {
SkPath path;
args.fShape->asPath(&path);
- if (path.countVerbs() > 10) {
+ if (path.countVerbs() > GR_AA_TESSELLATOR_MAX_VERB_COUNT) {
return CanDrawPath::kNo;
}
} else if (!args.fShape->hasUnstyledKey()) {