Chromium Code Reviews| Index: src/gpu/GrPathUtils.cpp |
| diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp |
| index 8e7a01d0915aa74a039c8d8e05abf3540fd4e4c3..d975833053ffbad93874147f6e7f42b840641cc0 100644 |
| --- a/src/gpu/GrPathUtils.cpp |
| +++ b/src/gpu/GrPathUtils.cpp |
| @@ -44,7 +44,7 @@ uint32_t GrPathUtils::quadraticPointCount(const SkPoint points[], |
| SkASSERT(tol > 0); |
| SkScalar d = points[1].distanceToLineSegmentBetween(points[0], points[2]); |
| - if (d <= tol) { |
| + if (d <= tol || !SkScalarIsFinite(d)) { |
| return 1; |
| } else { |
| // Each time we subdivide, d should be cut in 4. So we need to |
| @@ -99,7 +99,7 @@ uint32_t GrPathUtils::cubicPointCount(const SkPoint points[], |
| points[1].distanceToLineSegmentBetweenSqd(points[0], points[3]), |
| points[2].distanceToLineSegmentBetweenSqd(points[0], points[3])); |
| d = SkScalarSqrt(d); |
| - if (d <= tol) { |
| + if (d <= tol || !SkScalarIsFinite(d)) { |
|
reed2
2015/02/24 16:30:01
FYI : Seems like the changes to this file could la
Stephen White
2015/02/24 18:45:16
Done: https://codereview.chromium.org/951403002/
|
| return 1; |
| } else { |
| int temp = SkScalarCeilToInt(SkScalarSqrt(SkScalarDiv(d, tol))); |