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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 // Legacy macro names for SK_ABORT | 155 // Legacy macro names for SK_ABORT |
156 #define SkFAIL(message) SK_ABORT(message) | 156 #define SkFAIL(message) SK_ABORT(message) |
157 #define sk_throw() SK_ABORT("sk_throw") | 157 #define sk_throw() SK_ABORT("sk_throw") |
158 | 158 |
159 // We want to evaluate cond only once, and inside the SkASSERT somewhere so we s
ee its string form. | 159 // We want to evaluate cond only once, and inside the SkASSERT somewhere so we s
ee its string form. |
160 // So we use the comma operator to make an SkDebugf that always returns false: w
e'll evaluate cond, | 160 // So we use the comma operator to make an SkDebugf that always returns false: w
e'll evaluate cond, |
161 // and if it's true the assert passes; if it's false, we'll print the message an
d the assert fails. | 161 // and if it's true the assert passes; if it's false, we'll print the message an
d the assert fails. |
162 #define SkASSERTF(cond, fmt, ...) SkASSERT((cond) || (SkDebugf(fmt"\n", __
VA_ARGS__), false)) | 162 #define SkASSERTF(cond, fmt, ...) SkASSERT((cond) || (SkDebugf(fmt"\n", __
VA_ARGS__), false)) |
163 | 163 |
| 164 #ifdef SK_DEVELOPER |
| 165 #define SkDEVCODE(code) code |
| 166 #else |
| 167 #define SkDEVCODE(code) |
| 168 #endif |
| 169 |
164 #ifdef SK_IGNORE_TO_STRING | 170 #ifdef SK_IGNORE_TO_STRING |
165 #define SK_TO_STRING_NONVIRT() | 171 #define SK_TO_STRING_NONVIRT() |
166 #define SK_TO_STRING_VIRT() | 172 #define SK_TO_STRING_VIRT() |
167 #define SK_TO_STRING_PUREVIRT() | 173 #define SK_TO_STRING_PUREVIRT() |
168 #define SK_TO_STRING_OVERRIDE() | 174 #define SK_TO_STRING_OVERRIDE() |
169 #else | 175 #else |
170 class SkString; | 176 class SkString; |
171 // the 'toString' helper functions convert Sk* objects to human-readable | 177 // the 'toString' helper functions convert Sk* objects to human-readable |
172 // form in developer mode | 178 // form in developer mode |
173 #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const; | 179 #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const; |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 | 697 |
692 void* fPtr; | 698 void* fPtr; |
693 size_t fSize; // can be larger than the requested size (see kReuse) | 699 size_t fSize; // can be larger than the requested size (see kReuse) |
694 uint32_t fStorage[kSize >> 2]; | 700 uint32_t fStorage[kSize >> 2]; |
695 }; | 701 }; |
696 // Can't guard the constructor because it's a template class. | 702 // Can't guard the constructor because it's a template class. |
697 | 703 |
698 #endif /* C++ */ | 704 #endif /* C++ */ |
699 | 705 |
700 #endif | 706 #endif |
OLD | NEW |