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

Unified Diff: src/pathops/SkOpSegment.h

Issue 1394503003: fix some pathops bugs found in 1M skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init to avoid warning Created 5 years, 2 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/SkOpContour.h ('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 6a8ab851acfc396bd98c4944edddf61c478a8d56..98e140cba3e2e592ce29410283fa014471da48ac 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -115,8 +115,6 @@ 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 );
@@ -133,14 +131,35 @@ public:
}
void debugAddAngle(double startT, double endT, SkChunkAlloc*);
+ void debugAddAlignIntersection(const char* id, SkPathOpsDebug::GlitchLog* glitches,
+ const SkOpPtT& endPtT, const SkPoint& oldPt,
+ const SkOpContourHead* ) const;
+
+ void debugAddAlignIntersections(const char* id, SkPathOpsDebug::GlitchLog* glitches,
+ SkOpContourHead* contourList) const {
+ this->debugAddAlignIntersection(id, glitches, *fHead.ptT(), fOriginal[0], contourList);
+ this->debugAddAlignIntersection(id, glitches, *fTail.ptT(), fOriginal[1], contourList);
+ }
+
+ bool debugAddMissing(double t, const SkOpSegment* opp) const;
+ void debugAlign(const char* id, SkPathOpsDebug::GlitchLog* glitches) const;
const SkOpAngle* debugAngle(int id) const;
+#if DEBUG_ANGLE
+ void debugCheckAngleCoin() const;
+#endif
+ void debugCheckHealth(const char* id, SkPathOpsDebug::GlitchLog* ) const;
SkOpContour* debugContour(int id);
+ void debugFindCollapsed(const char* id, SkPathOpsDebug::GlitchLog* glitches) const;
int debugID() const {
return SkDEBUGRELEASE(fID, -1);
}
SkOpAngle* debugLastAngle();
+ void debugMissingCoincidence(const char* id, SkPathOpsDebug::GlitchLog* glitches,
+ const SkOpCoincidence* coincidences) const;
+ void debugMoveMultiples(const char* id, SkPathOpsDebug::GlitchLog* glitches) const;
+ void debugMoveNearby(const char* id, SkPathOpsDebug::GlitchLog* glitches) const;
const SkOpPtT* debugPtT(int id) const;
void debugReset();
const SkOpSegment* debugSegment(int id) const;
@@ -156,7 +175,7 @@ public:
const SkOpSpanBase* debugSpan(int id) const;
void debugValidate() const;
void detach(const SkOpSpan* );
- double distSq(double t, SkOpAngle* opp);
+ double distSq(double t, const SkOpAngle* opp) const;
bool done() const {
SkASSERT(fDoneCount <= fCount);
@@ -179,8 +198,8 @@ public:
void dumpAll() const;
void dumpAngles() const;
void dumpCoin() const;
- void dumpPts() const;
- void dumpPtsInner() const;
+ void dumpPts(const char* prefix = "seg") const;
+ void dumpPtsInner(const char* prefix = "seg") const;
void findCollapsed();
SkOpSegment* findNextOp(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** nextStart,
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698