OLD | NEW |
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" |
11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
12 | 12 |
13 #ifdef SK_RELEASE | 13 #ifdef SK_RELEASE |
14 #define FORCE_RELEASE 1 | 14 #define FORCE_RELEASE 1 |
15 #else | 15 #else |
16 #define FORCE_RELEASE 1 // set force release to 1 for multiple thread -- no deb
ugging | 16 #define FORCE_RELEASE 0 // set force release to 1 for multiple thread -- no deb
ugging |
17 #endif | 17 #endif |
18 | 18 |
19 #define ONE_OFF_DEBUG 0 | 19 #define ONE_OFF_DEBUG 0 |
20 #define ONE_OFF_DEBUG_MATHEMATICA 0 | 20 #define ONE_OFF_DEBUG_MATHEMATICA 0 |
21 | 21 |
22 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_ANDROID) | 22 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_ANDROID) |
23 #define SK_RAND(seed) rand() | 23 #define SK_RAND(seed) rand() |
24 #else | 24 #else |
25 #define SK_RAND(seed) rand_r(&seed) | 25 #define SK_RAND(seed) rand_r(&seed) |
26 #endif | 26 #endif |
(...skipping 27 matching lines...) Expand all Loading... |
54 #define DEBUG_CROSS 0 | 54 #define DEBUG_CROSS 0 |
55 #define DEBUG_FLAT_QUADS 0 | 55 #define DEBUG_FLAT_QUADS 0 |
56 #define DEBUG_FLOW 0 | 56 #define DEBUG_FLOW 0 |
57 #define DEBUG_MARK_DONE 0 | 57 #define DEBUG_MARK_DONE 0 |
58 #define DEBUG_PATH_CONSTRUCTION 0 | 58 #define DEBUG_PATH_CONSTRUCTION 0 |
59 #define DEBUG_SHOW_PATH 0 | 59 #define DEBUG_SHOW_PATH 0 |
60 #define DEBUG_SHOW_TEST_NAME 0 | 60 #define DEBUG_SHOW_TEST_NAME 0 |
61 #define DEBUG_SHOW_TEST_PROGRESS 0 | 61 #define DEBUG_SHOW_TEST_PROGRESS 0 |
62 #define DEBUG_SHOW_WINDING 0 | 62 #define DEBUG_SHOW_WINDING 0 |
63 #define DEBUG_SORT 0 | 63 #define DEBUG_SORT 0 |
| 64 #define DEBUG_SORT_COMPACT 0 |
64 #define DEBUG_SORT_SINGLE 0 | 65 #define DEBUG_SORT_SINGLE 0 |
65 #define DEBUG_SWAP_TOP 0 | 66 #define DEBUG_SWAP_TOP 0 |
66 #define DEBUG_UNSORTABLE 0 | 67 #define DEBUG_UNSORTABLE 0 |
67 #define DEBUG_WIND_BUMP 0 | 68 #define DEBUG_WIND_BUMP 0 |
68 #define DEBUG_WINDING 0 | 69 #define DEBUG_WINDING 0 |
69 #define DEBUG_WINDING_AT_T 0 | 70 #define DEBUG_WINDING_AT_T 0 |
70 | 71 |
71 #else | 72 #else |
72 | 73 |
73 #define DEBUG_ACTIVE_OP 1 | 74 #define DEBUG_ACTIVE_OP 1 |
74 #define DEBUG_ACTIVE_SPANS 1 | 75 #define DEBUG_ACTIVE_SPANS 1 |
75 #define DEBUG_ACTIVE_SPANS_FIRST_ONLY 0 | 76 #define DEBUG_ACTIVE_SPANS_FIRST_ONLY 0 |
76 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0 | 77 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0 |
77 #define DEBUG_ADD_INTERSECTING_TS 1 | 78 #define DEBUG_ADD_INTERSECTING_TS 1 |
78 #define DEBUG_ADD_T_PAIR 1 | 79 #define DEBUG_ADD_T_PAIR 1 |
79 #define DEBUG_ANGLE 1 | 80 #define DEBUG_ANGLE 1 |
80 #define DEBUG_AS_C_CODE 1 | 81 #define DEBUG_AS_C_CODE 1 |
81 #define DEBUG_ASSEMBLE 1 | 82 #define DEBUG_ASSEMBLE 1 |
82 #define DEBUG_CONCIDENT 1 | 83 #define DEBUG_CONCIDENT 1 |
83 #define DEBUG_CROSS 0 | 84 #define DEBUG_CROSS 0 |
84 #define DEBUG_FLAT_QUADS 0 | 85 #define DEBUG_FLAT_QUADS 0 |
85 #define DEBUG_FLOW 1 | 86 #define DEBUG_FLOW 1 |
86 #define DEBUG_MARK_DONE 1 | 87 #define DEBUG_MARK_DONE 1 |
87 #define DEBUG_PATH_CONSTRUCTION 1 | 88 #define DEBUG_PATH_CONSTRUCTION 1 |
88 #define DEBUG_SHOW_PATH 0 | 89 #define DEBUG_SHOW_PATH 0 |
89 #define DEBUG_SHOW_TEST_NAME 1 | 90 #define DEBUG_SHOW_TEST_NAME 1 |
90 #define DEBUG_SHOW_TEST_PROGRESS 1 | 91 #define DEBUG_SHOW_TEST_PROGRESS 1 |
91 #define DEBUG_SHOW_WINDING 0 | 92 #define DEBUG_SHOW_WINDING 0 |
92 #define DEBUG_SORT 1 | 93 #define DEBUG_SORT 1 |
| 94 #define DEBUG_SORT_COMPACT 0 |
93 #define DEBUG_SORT_SINGLE 0 | 95 #define DEBUG_SORT_SINGLE 0 |
94 #define DEBUG_SWAP_TOP 1 | 96 #define DEBUG_SWAP_TOP 1 |
95 #define DEBUG_UNSORTABLE 1 | 97 #define DEBUG_UNSORTABLE 1 |
96 #define DEBUG_WIND_BUMP 0 | 98 #define DEBUG_WIND_BUMP 0 |
97 #define DEBUG_WINDING 1 | 99 #define DEBUG_WINDING 1 |
98 #define DEBUG_WINDING_AT_T 1 | 100 #define DEBUG_WINDING_AT_T 1 |
99 | 101 |
100 #endif | 102 #endif |
101 | 103 |
102 #define DEBUG_DUMP (DEBUG_ACTIVE_OP | DEBUG_ACTIVE_SPANS | DEBUG_CONCIDENT | DEB
UG_SORT | \ | 104 #define DEBUG_DUMP (DEBUG_ACTIVE_OP | DEBUG_ACTIVE_SPANS | DEBUG_CONCIDENT | DEB
UG_SORT | \ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 #ifndef DEBUG_TEST | 144 #ifndef DEBUG_TEST |
143 #define DEBUG_TEST 0 | 145 #define DEBUG_TEST 0 |
144 #endif | 146 #endif |
145 | 147 |
146 #if DEBUG_SHOW_PATH | 148 #if DEBUG_SHOW_PATH |
147 void ShowPath(const SkPath& path, const char* pathName); | 149 void ShowPath(const SkPath& path, const char* pathName); |
148 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo); | 150 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo); |
149 #endif | 151 #endif |
150 | 152 |
151 #endif | 153 #endif |
OLD | NEW |