| 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 #include <stdlib.h> | 13 #include <stdlib.h> |
| 14 #include <stdio.h> | 14 #include <stdio.h> |
| 15 | 15 |
| 16 #ifdef SK_RELEASE | 16 #ifdef SK_RELEASE |
| 17 #define FORCE_RELEASE 1 | 17 #define FORCE_RELEASE 1 |
| 18 #else | 18 #else |
| 19 #define FORCE_RELEASE 1 // set force release to 1 for multiple thread -- no deb
ugging | 19 #define FORCE_RELEASE 1 // set force release to 1 for multiple thread -- no deb
ugging |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 #define DEBUG_UNDER_DEVELOPMENT 1 |
| 23 |
| 22 #define ONE_OFF_DEBUG 0 | 24 #define ONE_OFF_DEBUG 0 |
| 23 #define ONE_OFF_DEBUG_MATHEMATICA 0 | 25 #define ONE_OFF_DEBUG_MATHEMATICA 0 |
| 24 | 26 |
| 25 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_ANDROID) | 27 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_ANDROID) |
| 26 #define SK_RAND(seed) rand() | 28 #define SK_RAND(seed) rand() |
| 27 #else | 29 #else |
| 28 #define SK_RAND(seed) rand_r(&seed) | 30 #define SK_RAND(seed) rand_r(&seed) |
| 29 #endif | 31 #endif |
| 30 #ifdef SK_BUILD_FOR_WIN | 32 #ifdef SK_BUILD_FOR_WIN |
| 31 #define SK_SNPRINTF _snprintf | 33 #define SK_SNPRINTF _snprintf |
| 32 #else | 34 #else |
| 33 #define SK_SNPRINTF snprintf | 35 #define SK_SNPRINTF snprintf |
| 34 #endif | 36 #endif |
| 35 | 37 |
| 36 #define WIND_AS_STRING(x) char x##Str[12]; \ | 38 #define WIND_AS_STRING(x) char x##Str[12]; \ |
| 37 if (!SkPathOpsDebug::ValidWind(x)) strcpy(x##Str, "?"); \ | 39 if (!SkPathOpsDebug::ValidWind(x)) strcpy(x##Str, "?"); \ |
| 38 else SK_SNPRINTF(x##Str, sizeof(x##Str), "%d", x) | 40 else SK_SNPRINTF(x##Str, sizeof(x##Str), "%d", x) |
| 39 | 41 |
| 40 #define DEBUG_UNDER_DEVELOPMENT 1 | |
| 41 | |
| 42 #if FORCE_RELEASE | 42 #if FORCE_RELEASE |
| 43 | 43 |
| 44 #define DEBUG_ACTIVE_OP 0 | 44 #define DEBUG_ACTIVE_OP 0 |
| 45 #define DEBUG_ACTIVE_SPANS 0 | 45 #define DEBUG_ACTIVE_SPANS 0 |
| 46 #define DEBUG_ADD_INTERSECTING_TS 0 | 46 #define DEBUG_ADD_INTERSECTING_TS 0 |
| 47 #define DEBUG_ADD_T 0 | 47 #define DEBUG_ADD_T 0 |
| 48 #define DEBUG_ALIGNMENT 0 | 48 #define DEBUG_ALIGNMENT 0 |
| 49 #define DEBUG_ANGLE 0 | 49 #define DEBUG_ANGLE 0 |
| 50 #define DEBUG_ASSEMBLE 0 | 50 #define DEBUG_ASSEMBLE 0 |
| 51 #define DEBUG_COINCIDENCE 0 | 51 #define DEBUG_COINCIDENCE 0 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 static const class SkOpSpanBase* DebugSpanSpan(const class SkOpSpanBase*, in
t id); | 248 static const class SkOpSpanBase* DebugSpanSpan(const class SkOpSpanBase*, in
t id); |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 struct SkDQuad; | 251 struct SkDQuad; |
| 252 | 252 |
| 253 // generates tools/path_sorter.htm and path_visualizer.htm compatible data | 253 // generates tools/path_sorter.htm and path_visualizer.htm compatible data |
| 254 void DumpQ(const SkDQuad& quad1, const SkDQuad& quad2, int testNo); | 254 void DumpQ(const SkDQuad& quad1, const SkDQuad& quad2, int testNo); |
| 255 void DumpT(const SkDQuad& quad, double t); | 255 void DumpT(const SkDQuad& quad, double t); |
| 256 | 256 |
| 257 #endif | 257 #endif |
| OLD | NEW |