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

Unified Diff: src/pathops/SkOpSegment.h

Issue 1140813002: deal more consistently with unsortable edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux warning Created 5 years, 7 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 | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpSegment.h
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index 13b99c6f46d8b5ab4862fdc79f07ac91bf2ead28..1162c2cfaf438365f0376e2484b96660641510e8 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -33,11 +33,11 @@ public:
}
SkOpAngle* activeAngle(SkOpSpanBase* start, SkOpSpanBase** startPtr, SkOpSpanBase** endPtr,
- bool* done, bool* sortable);
+ bool* done);
SkOpAngle* activeAngleInner(SkOpSpanBase* start, SkOpSpanBase** startPtr,
- SkOpSpanBase** endPtr, bool* done, bool* sortable);
+ SkOpSpanBase** endPtr, bool* done);
SkOpAngle* activeAngleOther(SkOpSpanBase* start, SkOpSpanBase** startPtr,
- SkOpSpanBase** endPtr, bool* done, bool* sortable);
+ SkOpSpanBase** endPtr, bool* done);
bool activeOp(SkOpSpanBase* start, SkOpSpanBase* end, int xorMiMask, int xorSuMask,
SkPathOp op);
bool activeOp(int xorMiMask, int xorSuMask, SkOpSpanBase* start, SkOpSpanBase* end, SkPathOp op,
@@ -110,6 +110,7 @@ public:
void calcAngles(SkChunkAlloc*);
void checkAngleCoin(SkOpCoincidence* coincidences, SkChunkAlloc* allocator);
void checkNearCoincidence(SkOpAngle* );
+ bool collapsed() const;
static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle,
SkOpAngle::IncludeType );
static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle,
@@ -306,11 +307,8 @@ public:
fPrev = prev;
}
- bool setVisited() {
- if (fVisited) {
- return false;
- }
- return (fVisited = true);
+ void setVisited() {
+ fVisited = true;
}
void setUpWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* maxWinding, int* sumWinding) {
@@ -361,6 +359,15 @@ public:
return fVerb;
}
+ // look for two different spans that point to the same opposite segment
+ bool visited() {
+ if (!fVisited) {
+ fVisited = true;
+ return false;
+ }
+ return true;
+ }
+
SkScalar weight() const {
return fWeight;
}
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698