diff options
author | Brian Osman <brianosman@google.com> | 2017-06-07 11:38:31 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-09 13:25:36 +0000 |
commit | eb86b7094755a5fc1e49d22b4c5323f372344d61 (patch) | |
tree | 6b234e8d2ec263f2954865e6d327770805a2b73d /src/gpu/GrPathUtils.h | |
parent | 65a9344120049140ba79ce30c638a9f0b038cbc2 (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.
Re-land of: https://skia-review.googlesource.com/18360
Bug: skia:6695
Change-Id: Ibdedeb0ea2570a8847ba42328588bd7203411573
Reviewed-on: https://skia-review.googlesource.com/18983
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.h | 3 |
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 |