aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathUtils.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-06-06 16:46:38 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-07 14:20:39 +0000
commit6383b298489504d7f8f822d7da575b04b14a9737 (patch)
treea7ca649cb21391d5f53075ab957545788f3c14dd /src/gpu/GrPathUtils.h
parentb52fa02227d8e7413d174bc5b3808f795d0215f0 (diff)
Handle too many (or too large) paths in GrDefaultPathRenderer
PathGeoBuilder constructs the geometry with the same basic technique as before, but allows interrupting the process to emit multiple draws. Original test case was 2000 non-AA stroked circles, which created ~66000 vertices. That now renders, as do various tests with a single large path (as well as filled paths). TODO: I think that this could be extracted and re-used for MSAA path renderer without too much work? I need to read that code more carefully to make sure it lines up. Bug: skia:6695 Change-Id: I18983ba3d4f475ae0651946958b4911008aa623f Reviewed-on: https://skia-review.googlesource.com/18360 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrPathUtils.h')
-rw-r--r--src/gpu/GrPathUtils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrPathUtils.h b/src/gpu/GrPathUtils.h
index fdfd375427..421fca129b 100644
--- a/src/gpu/GrPathUtils.h
+++ b/src/gpu/GrPathUtils.h
@@ -165,5 +165,8 @@ namespace GrPathUtils {
// This value was chosen to approximate the supersampling accuracy of the raster path (16
// samples, or one quarter pixel).
static const SkScalar kDefaultTolerance = SkDoubleToScalar(0.25);
+
+ // We guarantee that no quad or cubic will ever produce more than this many points
+ static const int kMaxPointsPerCurve = 1 << 10;
};
#endif