diff options
author | Kevin Lubick <kjlubick@google.com> | 2018-04-02 09:07:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-02 14:18:34 +0000 |
commit | 01a1cf92603c048c81dec419177e4e5f76be50f6 (patch) | |
tree | 1315b7b0a6747d8af9ddaac2647cece81e7e5c20 /src | |
parent | 5ab52f6a38052c2316e8daae6bd51c928d487f3c (diff) |
More nans causing infinite recursion in GrPathUtils::convertCubicToQuads
Follow up to https://skia-review.googlesource.com/c/skia/+/87302
Bug: skia:
Change-Id: Ic2efef2eb44dbb6a1ffdd1618ea4833a5a5afc4b
Reviewed-on: https://skia-review.googlesource.com/117630
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrPathUtils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp index 74a53e9e09..d69481218e 100644 --- a/src/gpu/GrPathUtils.cpp +++ b/src/gpu/GrPathUtils.cpp @@ -543,6 +543,9 @@ void GrPathUtils::convertCubicToQuads(const SkPoint p[4], if (!p[0].isFinite() || !p[1].isFinite() || !p[2].isFinite() || !p[3].isFinite()) { return; } + if (!SkScalarIsFinite(tolScale)) { + return; + } SkPoint chopped[10]; int count = SkChopCubicAtInflections(p, chopped); @@ -563,6 +566,9 @@ void GrPathUtils::convertCubicToQuadsConstrainToTangents(const SkPoint p[4], if (!p[0].isFinite() || !p[1].isFinite() || !p[2].isFinite() || !p[3].isFinite()) { return; } + if (!SkScalarIsFinite(tolScale)) { + return; + } SkPoint chopped[10]; int count = SkChopCubicAtInflections(p, chopped); |