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 "SkTypes.h" | 10 #include "SkTypes.h" |
11 | 11 |
12 #ifdef SK_RELEASE | 12 #ifdef SK_RELEASE |
13 #define FORCE_RELEASE 1 | 13 #define FORCE_RELEASE 1 |
14 #else | 14 #else |
15 #define FORCE_RELEASE 1 // set force release to 1 for multiple thread -- no deb
ugging | 15 #define FORCE_RELEASE 1 // set force release to 1 for multiple thread -- no deb
ugging |
16 #endif | 16 #endif |
17 | 17 |
18 #define ONE_OFF_DEBUG 0 | 18 #define ONE_OFF_DEBUG 0 |
19 #define ONE_OFF_DEBUG_MATHEMATICA 0 | 19 #define ONE_OFF_DEBUG_MATHEMATICA 0 |
20 | 20 |
21 #if defined SK_DEBUG || !FORCE_RELEASE | |
22 | |
23 #ifdef SK_BUILD_FOR_WIN | 21 #ifdef SK_BUILD_FOR_WIN |
24 #define SK_RAND(seed) rand() | 22 #define SK_RAND(seed) rand() |
25 #define SK_SNPRINTF _snprintf | 23 #define SK_SNPRINTF _snprintf |
26 #else | 24 #else |
27 #define SK_RAND(seed) rand_r(&seed) | 25 #define SK_RAND(seed) rand_r(&seed) |
28 #define SK_SNPRINTF snprintf | 26 #define SK_SNPRINTF snprintf |
29 #endif | 27 #endif |
30 | 28 |
| 29 #if defined SK_DEBUG || !FORCE_RELEASE |
| 30 |
31 void mathematica_ize(char* str, size_t bufferSize); | 31 void mathematica_ize(char* str, size_t bufferSize); |
32 bool valid_wind(int winding); | 32 bool valid_wind(int winding); |
33 void winding_printf(int winding); | 33 void winding_printf(int winding); |
34 | 34 |
35 extern int gDebugMaxWindSum; | 35 extern int gDebugMaxWindSum; |
36 extern int gDebugMaxWindValue; | 36 extern int gDebugMaxWindValue; |
| 37 |
37 #endif | 38 #endif |
38 | 39 |
39 #if FORCE_RELEASE | 40 #if FORCE_RELEASE |
40 | 41 |
41 #define DEBUG_ACTIVE_OP 0 | 42 #define DEBUG_ACTIVE_OP 0 |
42 #define DEBUG_ACTIVE_SPANS 0 | 43 #define DEBUG_ACTIVE_SPANS 0 |
43 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0 | 44 #define DEBUG_ACTIVE_SPANS_SHORT_FORM 0 |
44 #define DEBUG_ADD_INTERSECTING_TS 0 | 45 #define DEBUG_ADD_INTERSECTING_TS 0 |
45 #define DEBUG_ADD_T_PAIR 0 | 46 #define DEBUG_ADD_T_PAIR 0 |
46 #define DEBUG_ANGLE 0 | 47 #define DEBUG_ANGLE 0 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 124 |
124 #if DEBUG_ACTIVE_OP | 125 #if DEBUG_ACTIVE_OP |
125 extern const char* kPathOpStr[]; | 126 extern const char* kPathOpStr[]; |
126 #endif | 127 #endif |
127 | 128 |
128 #ifndef DEBUG_TEST | 129 #ifndef DEBUG_TEST |
129 #define DEBUG_TEST 0 | 130 #define DEBUG_TEST 0 |
130 #endif | 131 #endif |
131 | 132 |
132 #endif | 133 #endif |
OLD | NEW |