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 | |
170 #ifdef SK_IGNORE_TO_STRING | 164 #ifdef SK_IGNORE_TO_STRING |
171 #define SK_TO_STRING_NONVIRT() | 165 #define SK_TO_STRING_NONVIRT() |
172 #define SK_TO_STRING_VIRT() | 166 #define SK_TO_STRING_VIRT() |
173 #define SK_TO_STRING_PUREVIRT() | 167 #define SK_TO_STRING_PUREVIRT() |
174 #define SK_TO_STRING_OVERRIDE() | 168 #define SK_TO_STRING_OVERRIDE() |
175 #else | 169 #else |
176 class SkString; | 170 class SkString; |
177 // the 'toString' helper functions convert Sk* objects to human-readable | 171 // the 'toString' helper functions convert Sk* objects to human-readable |
178 // form in developer mode | 172 // form in developer mode |
179 #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const; | 173 #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const; |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 | 691 |
698 void* fPtr; | 692 void* fPtr; |
699 size_t fSize; // can be larger than the requested size (see kReuse) | 693 size_t fSize; // can be larger than the requested size (see kReuse) |
700 uint32_t fStorage[kSize >> 2]; | 694 uint32_t fStorage[kSize >> 2]; |
701 }; | 695 }; |
702 // Can't guard the constructor because it's a template class. | 696 // Can't guard the constructor because it's a template class. |
703 | 697 |
704 #endif /* C++ */ | 698 #endif /* C++ */ |
705 | 699 |
706 #endif | 700 #endif |
OLD | NEW |