Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: src/core/SkGeometry.cpp

Issue 1580463002: Cherry pick to M48: give up on quad root if infinite (Closed) Base URL: https://skia.googlesource.com/skia.git@m48
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGeometry.cpp
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp
index 01b618073ab1741648fc2f0e1fdc5ad9b40b3a43..2e5888dfb52c14d3440b08d6de03fe5f285b8a9f 100644
--- a/src/core/SkGeometry.cpp
+++ b/src/core/SkGeometry.cpp
@@ -90,7 +90,7 @@ 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
return 0;
}
R = SkScalarSqrt(R);
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698