| Index: src/core/SkGeometry.cpp
|
| diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
|
| index f7c8f5736e64d0dc87fb83a749bd191b95909bf4..c25e18641a43bc0c766e1469a9c16d595e955282 100644
|
| --- a/src/core/SkGeometry.cpp
|
| +++ b/src/core/SkGeometry.cpp
|
| @@ -90,7 +90,13 @@ int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2]) {
|
| SkScalar* r = roots;
|
|
|
| SkScalar R = B*B - 4*A*C;
|
| - if (R < 0 || SkScalarIsNaN(R)) { // complex roots
|
| + if (R < 0 || !SkScalarIsFinite(R)) { // complex roots
|
| + // if R is infinite, it's possible that it may still produce
|
| + // useful results if the operation was repeated in doubles
|
| + // the flipside is determining if the more precise answer
|
| + // isn't useful because surrounding machinery (e.g., subtracting
|
| + // the axis offset from C) already discards the extra precision
|
| + // more investigation and unit tests required...
|
| return 0;
|
| }
|
| R = SkScalarSqrt(R);
|
|
|