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

Unified Diff: src/pathops/SkPathOpsTypes.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/SkPathOpsTSect.h ('k') | src/pathops/SkPathOpsTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsTypes.h
diff --git a/src/pathops/SkPathOpsTypes.h b/src/pathops/SkPathOpsTypes.h
index 2cd45a5c4d9a5b528e56a7671decef49a8cba429..f85c6653eb05d5eae6807b0373abf704ab880c9a 100644
--- a/src/pathops/SkPathOpsTypes.h
+++ b/src/pathops/SkPathOpsTypes.h
@@ -25,6 +25,8 @@ enum SkPathOpsMask {
class SkOpCoincidence;
class SkOpContour;
class SkOpContourHead;
+class SkIntersections;
+class SkIntersectionHelper;
class SkOpGlobalState {
public:
@@ -41,7 +43,7 @@ public:
kMaxWindingTries = 10
};
- bool angleCoincidence() {
+ bool angleCoincidence() const {
return fAngleCoincidence;
}
@@ -71,6 +73,14 @@ public:
const char* debugTestName() const { return fDebugTestName; }
#endif
+#if DEBUG_T_SECT_LOOP_COUNT
+ void debugAddLoopCount(SkIntersections* , const SkIntersectionHelper& ,
+ const SkIntersectionHelper& );
+ void debugDoYourWorst(SkOpGlobalState* );
+ void debugLoopReport();
+ void debugResetLoopCounts();
+#endif
+
int nested() const {
return fNested;
}
@@ -80,9 +90,14 @@ public:
return ++fAngleID;
}
+ int nextCoinID() {
+ return ++fCoinID;
+ }
+
int nextContourID() {
return ++fContourID;
}
+
int nextPtTID() {
return ++fPtTID;
}
@@ -132,11 +147,18 @@ private:
#ifdef SK_DEBUG
const char* fDebugTestName;
int fAngleID;
+ int fCoinID;
int fContourID;
int fPtTID;
int fSegmentID;
int fSpanID;
#endif
+#if DEBUG_T_SECT_LOOP_COUNT
+ int fDebugLoopCount[3];
+ SkPath::Verb fDebugWorstVerb[6];
+ SkPoint fDebugWorstPts[24];
+ float fDebugWorstWeight[6];
+#endif
};
// Use Almost Equal when comparing coordinates. Use epsilon to compare T values.
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | src/pathops/SkPathOpsTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698