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

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

Issue 12827020: Add base types for path ops (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« 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
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #ifndef SkPathOpsDebug_DEFINED
8 #define SkPathOpsDebug_DEFINED
9
10 #include "SkTypes.h"
11
12 #ifdef SK_RELEASE
13 #define FORCE_RELEASE 1
14 #else
15 #define FORCE_RELEASE 0 // set force release to 1 for multiple thread -- no deb ugging
16 #endif
17
18 #define ONE_OFF_DEBUG 0
19 #define ONE_OFF_DEBUG_MATHEMATICA 0
20
21 #if defined SK_DEBUG || !FORCE_RELEASE
22 void mathematica_ize(char* str, size_t bufferSize);
23 bool valid_wind(int winding);
24 void winding_printf(int winding);
25
26 extern int gDebugMaxWindSum;
27 extern int gDebugMaxWindValue;
28 #endif
29
30 #if FORCE_RELEASE
31
32 #define DEBUG_ACTIVE_OP 0
33 #define DEBUG_ACTIVE_SPANS 0
34 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0
35 #define DEBUG_ADD_INTERSECTING_TS 0
36 #define DEBUG_ADD_T_PAIR 0
37 #define DEBUG_ANGLE 0
38 #define DEBUG_AS_C_CODE 1
39 #define DEBUG_ASSEMBLE 0
40 #define DEBUG_CONCIDENT 0
41 #define DEBUG_CROSS 0
42 #define DEBUG_FLAT_QUADS 0
43 #define DEBUG_FLOW 0
44 #define DEBUG_MARK_DONE 0
45 #define DEBUG_PATH_CONSTRUCTION 0
46 #define DEBUG_SHOW_TEST_PROGRESS 0
47 #define DEBUG_SHOW_WINDING 0
48 #define DEBUG_SORT 0
49 #define DEBUG_SWAP_TOP 0
50 #define DEBUG_UNSORTABLE 0
51 #define DEBUG_WIND_BUMP 0
52 #define DEBUG_WINDING 0
53 #define DEBUG_WINDING_AT_T 0
54
55 #else
56
57 #define DEBUG_ACTIVE_OP 1
58 #define DEBUG_ACTIVE_SPANS 1
59 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0
60 #define DEBUG_ADD_INTERSECTING_TS 1
61 #define DEBUG_ADD_T_PAIR 1
62 #define DEBUG_ANGLE 1
63 #define DEBUG_AS_C_CODE 1
64 #define DEBUG_ASSEMBLE 1
65 #define DEBUG_CONCIDENT 1
66 #define DEBUG_CROSS 0
67 #define DEBUG_FLAT_QUADS 0
68 #define DEBUG_FLOW 1
69 #define DEBUG_MARK_DONE 1
70 #define DEBUG_PATH_CONSTRUCTION 1
71 #define DEBUG_SHOW_TEST_PROGRESS 1
72 #define DEBUG_SHOW_WINDING 0
73 #define DEBUG_SORT 1
74 #define DEBUG_SWAP_TOP 1
75 #define DEBUG_UNSORTABLE 1
76 #define DEBUG_WIND_BUMP 0
77 #define DEBUG_WINDING 1
78 #define DEBUG_WINDING_AT_T 1
79
80 #endif
81
82 #define DEBUG_DUMP (DEBUG_ACTIVE_OP | DEBUG_ACTIVE_SPANS | DEBUG_CONCIDENT | DEB UG_SORT | \
83 DEBUG_PATH_CONSTRUCTION)
84
85 #if DEBUG_AS_C_CODE
86 #define CUBIC_DEBUG_STR "{{%1.17g,%1.17g}, {%1.17g,%1.17g}, {%1.17g,%1.17g}, {%1 .17g,%1.17g}}"
87 #define QUAD_DEBUG_STR "{{%1.17g,%1.17g}, {%1.17g,%1.17g}, {%1.17g,%1.17g}}"
88 #define LINE_DEBUG_STR "{{%1.17g,%1.17g}, {%1.17g,%1.17g}}"
89 #define PT_DEBUG_STR "{{%1.17g,%1.17g}}"
90 #else
91 #define CUBIC_DEBUG_STR "(%1.9g,%1.9g %1.9g,%1.9g %1.9g,%1.9g %1.9g,%1.9g)"
92 #define QUAD_DEBUG_STR "(%1.9g,%1.9g %1.9g,%1.9g %1.9g,%1.9g)"
93 #define LINE_DEBUG_STR "(%1.9g,%1.9g %1.9g,%1.9g)"
94 #define PT_DEBUG_STR "(%1.9g,%1.9g)"
95 #endif
96 #define T_DEBUG_STR(t, n) #t "[" #n "]=%1.9g"
97 #define TX_DEBUG_STR(t) #t "[%d]=%1.9g"
98 #define CUBIC_DEBUG_DATA(c) c[0].fX, c[0].fY, c[1].fX, c[1].fY, c[2].fX, c[2].fY , c[3].fX, c[3].fY
99 #define QUAD_DEBUG_DATA(q) q[0].fX, q[0].fY, q[1].fX, q[1].fY, q[2].fX, q[2].fY
100 #define LINE_DEBUG_DATA(l) l[0].fX, l[0].fY, l[1].fX, l[1].fY
101 #define PT_DEBUG_DATA(i, n) i.pt(n).fX, i.pt(n).fY
102
103 #if DEBUG_DUMP
104 extern const char* kLVerbStr[];
105 // extern const char* kUVerbStr[];
106 extern int gContourID;
107 extern int gSegmentID;
108 #endif
109
110 #if DEBUG_SORT || DEBUG_SWAP_TOP
111 extern int gDebugSortCountDefault;
112 extern int gDebugSortCount;
113 #endif
114
115 #if DEBUG_ACTIVE_OP
116 extern const char* kPathOpStr[];
117 #endif
118
119 #ifndef DEBUG_TEST
120 #define DEBUG_TEST 0
121 #endif
122
123 #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