OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 7 |
8 #ifndef SkTypes_DEFINED | 8 #ifndef SkTypes_DEFINED |
9 #define SkTypes_DEFINED | 9 #define SkTypes_DEFINED |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 #define SK_INIT_TO_AVOID_WARNING = 0 | 125 #define SK_INIT_TO_AVOID_WARNING = 0 |
126 | 126 |
127 #ifndef SkDebugf | 127 #ifndef SkDebugf |
128 SK_API void SkDebugf(const char format[], ...); | 128 SK_API void SkDebugf(const char format[], ...); |
129 #endif | 129 #endif |
130 | 130 |
131 #define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); } | 131 #define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); } |
132 | 132 |
133 #ifdef SK_DEBUG | 133 #ifdef SK_DEBUG |
134 #define SkASSERT(cond) SkASSERT_RELEASE(cond) | 134 #if defined SK_BUILD_FOR_WIN |
| 135 #define SkASSERT(cond) if(!(cond)) { __debugbreak(); } |
| 136 #else |
| 137 #define SkASSERT(cond) SkASSERT_RELEASE(cond) |
| 138 #endif |
135 #define SkDEBUGFAIL(message) SkASSERT(false && message) | 139 #define SkDEBUGFAIL(message) SkASSERT(false && message) |
136 #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) | 140 #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) |
137 #define SkDEBUGCODE(code) code | 141 #define SkDEBUGCODE(code) code |
138 #define SkDECLAREPARAM(type, var) , type var | 142 #define SkDECLAREPARAM(type, var) , type var |
139 #define SkPARAM(var) , var | 143 #define SkPARAM(var) , var |
140 // #define SkDEBUGF(args ) SkDebugf##args | 144 // #define SkDEBUGF(args ) SkDebugf##args |
141 #define SkDEBUGF(args ) SkDebugf args | 145 #define SkDEBUGF(args ) SkDebugf args |
142 #define SkAssertResult(cond) SkASSERT(cond) | 146 #define SkAssertResult(cond) SkASSERT(cond) |
143 #else | 147 #else |
144 #define SkASSERT(cond) | 148 #define SkASSERT(cond) |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 705 |
702 void* fPtr; | 706 void* fPtr; |
703 size_t fSize; // can be larger than the requested size (see kReuse) | 707 size_t fSize; // can be larger than the requested size (see kReuse) |
704 uint32_t fStorage[kSize >> 2]; | 708 uint32_t fStorage[kSize >> 2]; |
705 }; | 709 }; |
706 // Can't guard the constructor because it's a template class. | 710 // Can't guard the constructor because it's a template class. |
707 | 711 |
708 #endif /* C++ */ | 712 #endif /* C++ */ |
709 | 713 |
710 #endif | 714 #endif |
OLD | NEW |