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

Unified Diff: src/pathops/SkOpAngle.cpp

Issue 52653002: pathops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add raster vs gpu test Created 7 years, 1 month 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 | « src/pathops/SkIntersections.cpp ('k') | src/pathops/SkOpContour.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpAngle.cpp
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index 5e1d9e745ebf98c14eed55dd874121155801de8f..4144add6fb2008da91a058fe9e4ede7376a513df 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -207,7 +207,10 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { // this/lh: left-hand; r
return COMPARE_RESULT("roots == 0 || rroots == 0", this < &rh);
}
SkASSERT(fSide != 0 && rh.fSide != 0);
- SkASSERT(fSide * rh.fSide > 0); // both are the same sign
+ if (fSide * rh.fSide < 0) {
+ fUnsortable = true;
+ return COMPARE_RESULT("14 fSide * rh.fSide < 0", this < &rh);
+ }
SkDPoint lLoc;
double best = SK_ScalarInfinity;
#if DEBUG_SORT
@@ -246,7 +249,7 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { // this/lh: left-hand; r
if (flip) {
leftLessThanRight = !leftLessThanRight;
}
- return COMPARE_RESULT("14 leftLessThanRight", leftLessThanRight);
+ return COMPARE_RESULT("15 leftLessThanRight", leftLessThanRight);
}
bool SkOpAngle::isHorizontal() const {
« no previous file with comments | « src/pathops/SkIntersections.cpp ('k') | src/pathops/SkOpContour.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698