| 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" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #define DEBUG_ADD_T_PAIR 0 | 49 #define DEBUG_ADD_T_PAIR 0 |
| 50 #define DEBUG_ANGLE 0 | 50 #define DEBUG_ANGLE 0 |
| 51 #define DEBUG_AS_C_CODE 1 | 51 #define DEBUG_AS_C_CODE 1 |
| 52 #define DEBUG_ASSEMBLE 0 | 52 #define DEBUG_ASSEMBLE 0 |
| 53 #define DEBUG_CONCIDENT 0 | 53 #define DEBUG_CONCIDENT 0 |
| 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 | |
| 60 #define DEBUG_SHOW_TEST_NAME 0 | 59 #define DEBUG_SHOW_TEST_NAME 0 |
| 61 #define DEBUG_SHOW_TEST_PROGRESS 0 | 60 #define DEBUG_SHOW_TEST_PROGRESS 0 |
| 62 #define DEBUG_SHOW_WINDING 0 | 61 #define DEBUG_SHOW_WINDING 0 |
| 63 #define DEBUG_SORT 0 | 62 #define DEBUG_SORT 0 |
| 64 #define DEBUG_SORT_COMPACT 0 | 63 #define DEBUG_SORT_COMPACT 0 |
| 65 #define DEBUG_SORT_SINGLE 0 | 64 #define DEBUG_SORT_SINGLE 0 |
| 66 #define DEBUG_SWAP_TOP 0 | 65 #define DEBUG_SWAP_TOP 0 |
| 67 #define DEBUG_UNSORTABLE 0 | 66 #define DEBUG_UNSORTABLE 0 |
| 68 #define DEBUG_WIND_BUMP 0 | 67 #define DEBUG_WIND_BUMP 0 |
| 69 #define DEBUG_WINDING 0 | 68 #define DEBUG_WINDING 0 |
| 70 #define DEBUG_WINDING_AT_T 0 | 69 #define DEBUG_WINDING_AT_T 0 |
| 71 | 70 |
| 72 #else | 71 #else |
| 73 | 72 |
| 74 #define DEBUG_ACTIVE_OP 1 | 73 #define DEBUG_ACTIVE_OP 1 |
| 75 #define DEBUG_ACTIVE_SPANS 1 | 74 #define DEBUG_ACTIVE_SPANS 1 |
| 76 #define DEBUG_ACTIVE_SPANS_FIRST_ONLY 0 | 75 #define DEBUG_ACTIVE_SPANS_FIRST_ONLY 0 |
| 77 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 1 | 76 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 1 |
| 78 #define DEBUG_ADD_INTERSECTING_TS 1 | 77 #define DEBUG_ADD_INTERSECTING_TS 1 |
| 79 #define DEBUG_ADD_T_PAIR 1 | 78 #define DEBUG_ADD_T_PAIR 1 |
| 80 #define DEBUG_ANGLE 1 | 79 #define DEBUG_ANGLE 1 |
| 81 #define DEBUG_AS_C_CODE 1 | 80 #define DEBUG_AS_C_CODE 1 |
| 82 #define DEBUG_ASSEMBLE 1 | 81 #define DEBUG_ASSEMBLE 1 |
| 83 #define DEBUG_CONCIDENT 1 | 82 #define DEBUG_CONCIDENT 1 |
| 84 #define DEBUG_CROSS 0 | 83 #define DEBUG_CROSS 0 |
| 85 #define DEBUG_FLAT_QUADS 0 | 84 #define DEBUG_FLAT_QUADS 0 |
| 86 #define DEBUG_FLOW 1 | 85 #define DEBUG_FLOW 1 |
| 87 #define DEBUG_MARK_DONE 1 | 86 #define DEBUG_MARK_DONE 1 |
| 88 #define DEBUG_PATH_CONSTRUCTION 1 | 87 #define DEBUG_PATH_CONSTRUCTION 1 |
| 89 #define DEBUG_SHOW_PATH 0 | |
| 90 #define DEBUG_SHOW_TEST_NAME 1 | 88 #define DEBUG_SHOW_TEST_NAME 1 |
| 91 #define DEBUG_SHOW_TEST_PROGRESS 1 | 89 #define DEBUG_SHOW_TEST_PROGRESS 1 |
| 92 #define DEBUG_SHOW_WINDING 0 | 90 #define DEBUG_SHOW_WINDING 0 |
| 93 #define DEBUG_SORT 1 | 91 #define DEBUG_SORT 1 |
| 94 #define DEBUG_SORT_COMPACT 0 | 92 #define DEBUG_SORT_COMPACT 0 |
| 95 #define DEBUG_SORT_SINGLE 0 | 93 #define DEBUG_SORT_SINGLE 0 |
| 96 #define DEBUG_SWAP_TOP 1 | 94 #define DEBUG_SWAP_TOP 1 |
| 97 #define DEBUG_UNSORTABLE 1 | 95 #define DEBUG_UNSORTABLE 1 |
| 98 #define DEBUG_WIND_BUMP 0 | 96 #define DEBUG_WIND_BUMP 0 |
| 99 #define DEBUG_WINDING 1 | 97 #define DEBUG_WINDING 1 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 extern int gDebugSortCount; | 132 extern int gDebugSortCount; |
| 135 | 133 |
| 136 bool valid_wind(int winding); | 134 bool valid_wind(int winding); |
| 137 void winding_printf(int winding); | 135 void winding_printf(int winding); |
| 138 #endif | 136 #endif |
| 139 | 137 |
| 140 #if DEBUG_ACTIVE_OP | 138 #if DEBUG_ACTIVE_OP |
| 141 extern const char* kPathOpStr[]; | 139 extern const char* kPathOpStr[]; |
| 142 #endif | 140 #endif |
| 143 | 141 |
| 142 #if DEBUG_SHOW_TEST_NAME |
| 143 #include "SkTLS.h" |
| 144 |
| 145 extern void* PathOpsDebugCreateNameStr(); |
| 146 extern void PathOpsDebugDeleteNameStr(void* v); |
| 147 #define DEBUG_FILENAME_STRING_LENGTH 64 |
| 148 #define DEBUG_FILENAME_STRING \ |
| 149 (reinterpret_cast<char* >(SkTLS::Get(PathOpsDebugCreateNameStr, PathOpsDebug
DeleteNameStr))) |
| 150 extern void DebugBumpTestName(char* ); |
| 151 extern void DebugShowPath(const SkPath& one, const SkPath& two, SkPathOp op, con
st char* name); |
| 152 #endif |
| 153 |
| 144 #ifndef DEBUG_TEST | 154 #ifndef DEBUG_TEST |
| 145 #define DEBUG_TEST 0 | 155 #define DEBUG_TEST 0 |
| 146 #endif | 156 #endif |
| 147 | 157 |
| 148 #if DEBUG_SHOW_PATH | |
| 149 void ShowFunctionHeader(); | |
| 150 void ShowPath(const SkPath& path, const char* pathName); | |
| 151 void ShowOp(SkPathOp op, const char* pathOne, const char* pathTwo); | |
| 152 #endif | 158 #endif |
| 153 | |
| 154 #endif | |
| OLD | NEW |