Pre-clamp path tolerance
authorBrian Osman <brianosman@google.com>
Tue, 9 May 2017 20:36:41 +0000 (16:36 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 9 May 2017 20:58:41 +0000 (20:58 +0000)
commit25294d76b1c5ca34ba6cc7033ee42af6484b046b
tree61ba4d5a8b44f8cb1221703281b0f633e2544c92
parentfdf31035a9639c2d377bdf2ddb404d269f8ca42a
Pre-clamp path tolerance

GrDefaultPathRenderer was using GrPathUtils::worstCasePointCount, which
clamped the tolerance. Then it built geometry with the unclamped value,
leading to vertex overflow (found by canvas fuzzer). The new rule is if
you use GrPathUtils, your tolerance must come from scaleToleranceToSrc.

Bug: skia:6569
Change-Id: I851519db8e569e570c717033d697f3d4d3d787fb
Reviewed-on: https://skia-review.googlesource.com/16234
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
src/gpu/GrPathUtils.cpp
src/gpu/GrPathUtils.h