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

Unified Diff: src/pathops/SkIntersections.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/SkAddIntersections.cpp ('k') | src/pathops/SkOpAngle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkIntersections.h
diff --git a/src/pathops/SkIntersections.h b/src/pathops/SkIntersections.h
index ac9276beec2299df7ce9c800af76fde92d640099..b733ed0ea7f654847fbe6b3629c02af886d36858 100644
--- a/src/pathops/SkIntersections.h
+++ b/src/pathops/SkIntersections.h
@@ -25,6 +25,9 @@ public:
sk_bzero(fPt2, sizeof(fPt2));
sk_bzero(fT, sizeof(fT));
sk_bzero(fNearlySame, sizeof(fNearlySame));
+#if DEBUG_T_SECT_LOOP_COUNT
+ sk_bzero(fDebugLoopCount, sizeof(fDebugLoopCount));
+#endif
reset();
fMax = 0; // require that the caller set the max
}
@@ -277,7 +280,16 @@ public:
#endif
}
+ enum DebugLoop {
+ kIterations_DebugLoop,
+ kCoinCheck_DebugLoop,
+ kComputePerp_DebugLoop,
+ };
+
+ void debugBumpLoopCount(DebugLoop );
int debugCoincidentUsed() const;
+ int debugLoopCount(DebugLoop ) const;
+ void debugResetLoopCount();
void dump() const; // implemented for testing only
private:
@@ -299,6 +311,9 @@ private:
#ifdef SK_DEBUG
int fDepth;
#endif
+#if DEBUG_T_SECT_LOOP_COUNT
+ int fDebugLoopCount[3];
+#endif
};
#endif
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkOpAngle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698