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

Side by Side Diff: src/pathops/SkPathOpsDebug.h

Issue 1096923003: working on initial winding for cubics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsCurve.h ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkPathOpsDebug_DEFINED 7 #ifndef SkPathOpsDebug_DEFINED
8 #define SkPathOpsDebug_DEFINED 8 #define SkPathOpsDebug_DEFINED
9 9
10 #include "SkPathOps.h" 10 #include "SkPathOps.h"
(...skipping 19 matching lines...) Expand all
30 #else 30 #else
31 #define SK_SNPRINTF snprintf 31 #define SK_SNPRINTF snprintf
32 #endif 32 #endif
33 33
34 #define WIND_AS_STRING(x) char x##Str[12]; \ 34 #define WIND_AS_STRING(x) char x##Str[12]; \
35 if (!SkPathOpsDebug::ValidWind(x)) strcpy(x##Str, "?"); \ 35 if (!SkPathOpsDebug::ValidWind(x)) strcpy(x##Str, "?"); \
36 else SK_SNPRINTF(x##Str, sizeof(x##Str), "%d", x) 36 else SK_SNPRINTF(x##Str, sizeof(x##Str), "%d", x)
37 37
38 #if FORCE_RELEASE 38 #if FORCE_RELEASE
39 39
40 #define DEBUG_CUBIC_SWAP_TOP 0
41
40 #define DEBUG_ACTIVE_OP 0 42 #define DEBUG_ACTIVE_OP 0
41 #define DEBUG_ACTIVE_SPANS 0 43 #define DEBUG_ACTIVE_SPANS 0
42 #define DEBUG_ADD_INTERSECTING_TS 0 44 #define DEBUG_ADD_INTERSECTING_TS 0
43 #define DEBUG_ADD_T 0 45 #define DEBUG_ADD_T 0
44 #define DEBUG_ANGLE 0 46 #define DEBUG_ANGLE 0
45 #define DEBUG_ASSEMBLE 0 47 #define DEBUG_ASSEMBLE 0
46 #define DEBUG_CUBIC_BINARY_SEARCH 0 48 #define DEBUG_CUBIC_BINARY_SEARCH 0
49 #define DEBUG_CUBIC_SPLIT 0
50 #define DEBUG_DUMP_SEGMENTS DEBUG_CUBIC_SWAP_TOP
47 #define DEBUG_FLOW 0 51 #define DEBUG_FLOW 0
48 #define DEBUG_LIMIT_WIND_SUM 0 52 #define DEBUG_LIMIT_WIND_SUM 0
49 #define DEBUG_MARK_DONE 0 53 #define DEBUG_MARK_DONE 0
50 #define DEBUG_PATH_CONSTRUCTION 0 54 #define DEBUG_PATH_CONSTRUCTION 0
51 #define DEBUG_PERP 0 55 #define DEBUG_PERP 0
52 #define DEBUG_SHOW_TEST_NAME 0 56 #define DEBUG_SHOW_TEST_NAME DEBUG_CUBIC_SWAP_TOP
53 #define DEBUG_SORT 0 57 #define DEBUG_SORT 0
54 #define DEBUG_SWAP_TOP 0 58 #define DEBUG_SWAP_TOP DEBUG_CUBIC_SWAP_TOP
55 #define DEBUG_T_SECT 0 59 #define DEBUG_T_SECT 0
56 #define DEBUG_T_SECT_DUMP 0 60 #define DEBUG_T_SECT_DUMP 0
57 #define DEBUG_VALIDATE 0 61 #define DEBUG_VALIDATE 0
58 #define DEBUG_WINDING 0 62 #define DEBUG_WINDING 0
59 #define DEBUG_WINDING_AT_T 0 63 #define DEBUG_WINDING_AT_T 0
60 64
65 #undef DEBUG_CUBIC_SWAP_TOP
66
61 #else 67 #else
62 68
63 #define DEBUG_ACTIVE_OP 1 69 #define DEBUG_ACTIVE_OP 1
64 #define DEBUG_ACTIVE_SPANS 1 70 #define DEBUG_ACTIVE_SPANS 1
65 #define DEBUG_ADD_INTERSECTING_TS 1 71 #define DEBUG_ADD_INTERSECTING_TS 1
66 #define DEBUG_ADD_T 1 72 #define DEBUG_ADD_T 1
67 #define DEBUG_ANGLE 1 73 #define DEBUG_ANGLE 1
68 #define DEBUG_ASSEMBLE 1 74 #define DEBUG_ASSEMBLE 1
69 #define DEBUG_CUBIC_BINARY_SEARCH 0 75 #define DEBUG_CUBIC_BINARY_SEARCH 0
76 #define DEBUG_CUBIC_SPLIT 1
77 #define DEBUG_DUMP_SEGMENTS 1
70 #define DEBUG_FLOW 1 78 #define DEBUG_FLOW 1
71 #define DEBUG_LIMIT_WIND_SUM 5 79 #define DEBUG_LIMIT_WIND_SUM 5
72 #define DEBUG_MARK_DONE 1 80 #define DEBUG_MARK_DONE 1
73 #define DEBUG_PATH_CONSTRUCTION 1 81 #define DEBUG_PATH_CONSTRUCTION 1
74 #define DEBUG_PERP 0 82 #define DEBUG_PERP 1
75 #define DEBUG_SHOW_TEST_NAME 1 83 #define DEBUG_SHOW_TEST_NAME 1
76 #define DEBUG_SORT 1 84 #define DEBUG_SORT 1
77 #define DEBUG_SWAP_TOP 1 85 #define DEBUG_SWAP_TOP 1
78 #define DEBUG_T_SECT 1 86 #define DEBUG_T_SECT 0
79 #define DEBUG_T_SECT_DUMP 02 87 #define DEBUG_T_SECT_DUMP 0
80 #define DEBUG_VALIDATE 1 88 #define DEBUG_VALIDATE 1
81 #define DEBUG_WINDING 1 89 #define DEBUG_WINDING 1
82 #define DEBUG_WINDING_AT_T 1 90 #define DEBUG_WINDING_AT_T 1
83 91
84 #endif 92 #endif
85 93
86 #ifdef SK_RELEASE 94 #ifdef SK_RELEASE
87 #define SkDEBUGRELEASE(a, b) b 95 #define SkDEBUGRELEASE(a, b) b
88 #define SkDEBUGPARAMS(...) 96 #define SkDEBUGPARAMS(...)
89 #define SkDEBUGCODE_(...) 97 #define SkDEBUGCODE_(...)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 static void WindingPrintf(int winding); 162 static void WindingPrintf(int winding);
155 163
156 #if DEBUG_SHOW_TEST_NAME 164 #if DEBUG_SHOW_TEST_NAME
157 static void* CreateNameStr(); 165 static void* CreateNameStr();
158 static void DeleteNameStr(void* v); 166 static void DeleteNameStr(void* v);
159 #define DEBUG_FILENAME_STRING_LENGTH 64 167 #define DEBUG_FILENAME_STRING_LENGTH 64
160 #define DEBUG_FILENAME_STRING (reinterpret_cast<char* >(SkTLS::Get(SkPathOpsDebu g::CreateNameStr, \ 168 #define DEBUG_FILENAME_STRING (reinterpret_cast<char* >(SkTLS::Get(SkPathOpsDebu g::CreateNameStr, \
161 SkPathOpsDebug::DeleteNameStr))) 169 SkPathOpsDebug::DeleteNameStr)))
162 static void BumpTestName(char* ); 170 static void BumpTestName(char* );
163 #endif 171 #endif
172 static const char* OpStr(SkPathOp );
164 static void ShowOnePath(const SkPath& path, const char* name, bool includeDe claration); 173 static void ShowOnePath(const SkPath& path, const char* name, bool includeDe claration);
165 static void ShowPath(const SkPath& one, const SkPath& two, SkPathOp op, cons t char* name); 174 static void ShowPath(const SkPath& one, const SkPath& two, SkPathOp op, cons t char* name);
166 175
167 static bool ChaseContains(const SkTDArray<class SkOpSpanBase*>& , const clas s SkOpSpanBase* ); 176 static bool ChaseContains(const SkTDArray<class SkOpSpanBase*>& , const clas s SkOpSpanBase* );
168 177
169 static const struct SkOpAngle* DebugAngleAngle(const struct SkOpAngle*, int id); 178 static const struct SkOpAngle* DebugAngleAngle(const struct SkOpAngle*, int id);
170 static class SkOpContour* DebugAngleContour(struct SkOpAngle*, int id); 179 static class SkOpContour* DebugAngleContour(struct SkOpAngle*, int id);
171 static const class SkOpPtT* DebugAnglePtT(const struct SkOpAngle*, int id); 180 static const class SkOpPtT* DebugAnglePtT(const struct SkOpAngle*, int id);
172 static const class SkOpSegment* DebugAngleSegment(const struct SkOpAngle*, i nt id); 181 static const class SkOpSegment* DebugAngleSegment(const struct SkOpAngle*, i nt id);
173 static const class SkOpSpanBase* DebugAngleSpan(const struct SkOpAngle*, int id); 182 static const class SkOpSpanBase* DebugAngleSpan(const struct SkOpAngle*, int id);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void Dump(const SkTDArray<class SkOpContour* >* contours); 230 void Dump(const SkTDArray<class SkOpContour* >* contours);
222 void DumpAll(SkTDArray<class SkOpContour* >* contours); 231 void DumpAll(SkTDArray<class SkOpContour* >* contours);
223 void DumpAngles(const SkTDArray<class SkOpContour* >* contours); 232 void DumpAngles(const SkTDArray<class SkOpContour* >* contours);
224 void DumpCoin(const SkTDArray<class SkOpContour* >* contours); 233 void DumpCoin(const SkTDArray<class SkOpContour* >* contours);
225 void DumpPt(const SkTDArray<class SkOpContour* >* contours, int segmentID); 234 void DumpPt(const SkTDArray<class SkOpContour* >* contours, int segmentID);
226 void DumpPts(const SkTDArray<class SkOpContour* >* contours); 235 void DumpPts(const SkTDArray<class SkOpContour* >* contours);
227 void DumpSegment(const SkTDArray<class SkOpContour* >* contours, int segmentID); 236 void DumpSegment(const SkTDArray<class SkOpContour* >* contours, int segmentID);
228 void DumpSpan(const SkTDArray<class SkOpContour* >* contours, int spanID); 237 void DumpSpan(const SkTDArray<class SkOpContour* >* contours, int spanID);
229 void DumpSpans(const SkTDArray<class SkOpContour* >* contours); 238 void DumpSpans(const SkTDArray<class SkOpContour* >* contours);
230 #endif 239 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCurve.h ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698