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

Unified Diff: src/pathops/SkPathOpsDebug.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/SkPathOpsCommon.cpp ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsDebug.h
diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h
index 969a9907d51eb03e95a89d2c20b7c5c37edcb0e7..cdfddcf254fc457d0bfcf9fd3e7ac39241cfc40a 100644
--- a/src/pathops/SkPathOpsDebug.h
+++ b/src/pathops/SkPathOpsDebug.h
@@ -43,8 +43,10 @@
#define DEBUG_ACTIVE_SPANS 0
#define DEBUG_ADD_INTERSECTING_TS 0
#define DEBUG_ADD_T 0
+#define DEBUG_ALIGNMENT 0
#define DEBUG_ANGLE 0
#define DEBUG_ASSEMBLE 0
+#define DEBUG_COINCIDENCE 0
#define DEBUG_CUBIC_BINARY_SEARCH 0
#define DEBUG_CUBIC_SPLIT 0
#define DEBUG_DUMP_SEGMENTS 0
@@ -57,18 +59,22 @@
#define DEBUG_SORT 0
#define DEBUG_T_SECT 0
#define DEBUG_T_SECT_DUMP 0
+#define DEBUG_T_SECT_LOOP_COUNT 0
#define DEBUG_VALIDATE 0
#define DEBUG_WINDING 0
#define DEBUG_WINDING_AT_T 0
+
#else
#define DEBUG_ACTIVE_OP 1
#define DEBUG_ACTIVE_SPANS 1
#define DEBUG_ADD_INTERSECTING_TS 1
#define DEBUG_ADD_T 1
+#define DEBUG_ALIGNMENT 0
#define DEBUG_ANGLE 1
#define DEBUG_ASSEMBLE 1
+#define DEBUG_COINCIDENCE 1
#define DEBUG_CUBIC_BINARY_SEARCH 0
#define DEBUG_CUBIC_SPLIT 1
#define DEBUG_DUMP_SEGMENTS 1
@@ -79,8 +85,9 @@
#define DEBUG_PERP 1
#define DEBUG_SHOW_TEST_NAME 1
#define DEBUG_SORT 1
-#define DEBUG_T_SECT 0
-#define DEBUG_T_SECT_DUMP 0
+#define DEBUG_T_SECT 1
+#define DEBUG_T_SECT_DUMP 1
+#define DEBUG_T_SECT_LOOP_COUNT 1
#define DEBUG_VALIDATE 1
#define DEBUG_WINDING 1
#define DEBUG_WINDING_AT_T 1
@@ -117,6 +124,13 @@
extern int gDumpTSectNum;
#endif
+#if DEBUG_COINCIDENCE
+ #define DEBUG_COINCIDENCE_HEALTH(contourList, id) \
+ SkPathOpsDebug::CheckHealth(contourList, id)
+#else
+ #define DEBUG_COINCIDENCE_HEALTH(contourList, id)
+#endif
+
#define CUBIC_DEBUG_STR "{{{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}}}"
#define CONIC_DEBUG_STR "{{{{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}}}, %1.9g}"
#define QUAD_DEBUG_STR "{{{%1.9g,%1.9g}, {%1.9g,%1.9g}, {%1.9g,%1.9g}}}"
@@ -142,6 +156,7 @@
class SkPathOpsDebug {
public:
static const char* kLVerbStr[];
+ struct GlitchLog;
#if defined(SK_DEBUG) || !FORCE_RELEASE
static int gContourID;
@@ -157,6 +172,7 @@ public:
static const char* kPathOpStr[];
#endif
+ static void CoincidentHealth(class SkOpContourHead* contourList, const char* id);
static void MathematicaIze(char* str, size_t bufferSize);
static bool ValidWind(int winding);
static void WindingPrintf(int winding);
@@ -175,6 +191,8 @@ public:
static bool ChaseContains(const SkTDArray<class SkOpSpanBase*>& , const class SkOpSpanBase* );
+ static void CheckHealth(class SkOpContourHead* contourList, const char* id);
+
static const struct SkOpAngle* DebugAngleAngle(const struct SkOpAngle*, int id);
static class SkOpContour* DebugAngleContour(struct SkOpAngle*, int id);
static const class SkOpPtT* DebugAnglePtT(const struct SkOpAngle*, int id);
« no previous file with comments | « src/pathops/SkPathOpsCommon.cpp ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698