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>
This commit is contained in:
Kevin Lubick 2018-04-02 09:07:53 -04:00 committed by Skia Commit-Bot
parent 5ab52f6a38
commit 01a1cf9260

View File

@ -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);