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

Unified Diff: src/pathops/SkReduceOrder.cpp

Issue 1522183002: only call scalar finite when necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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
« src/pathops/SkPathOpsTypes.cpp ('K') | « src/pathops/SkPathOpsTypes.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkReduceOrder.cpp
diff --git a/src/pathops/SkReduceOrder.cpp b/src/pathops/SkReduceOrder.cpp
index 43a91901f76f9b4539545340d206d946a528c002..52a19d6138aaa38dbe257090cebaeb60ba283601 100644
--- a/src/pathops/SkReduceOrder.cpp
+++ b/src/pathops/SkReduceOrder.cpp
@@ -126,7 +126,7 @@ static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) {
double sideAx = midX - cubic[3].fX;
double sideBx = dx23 * 3 / 2;
if (approximately_zero(sideAx) ? !approximately_equal(sideAx, sideBx)
- : !AlmostEqualUlps(sideAx, sideBx)) {
+ : !AlmostEqualUlps_Pin(sideAx, sideBx)) {
return 0;
}
double dy10 = cubic[1].fY - cubic[0].fY;
@@ -135,7 +135,7 @@ static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) {
double sideAy = midY - cubic[3].fY;
double sideBy = dy23 * 3 / 2;
if (approximately_zero(sideAy) ? !approximately_equal(sideAy, sideBy)
- : !AlmostEqualUlps(sideAy, sideBy)) {
+ : !AlmostEqualUlps_Pin(sideAy, sideBy)) {
return 0;
}
reduction[0] = cubic[0];
« src/pathops/SkPathOpsTypes.cpp ('K') | « src/pathops/SkPathOpsTypes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698