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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 #define SK_INIT_TO_AVOID_WARNING = 0 | 100 #define SK_INIT_TO_AVOID_WARNING = 0 |
101 | 101 |
102 #ifndef SkDebugf | 102 #ifndef SkDebugf |
103 SK_API void SkDebugf(const char format[], ...); | 103 SK_API void SkDebugf(const char format[], ...); |
104 #endif | 104 #endif |
105 | 105 |
106 #ifdef SK_DEBUG | 106 #ifdef SK_DEBUG |
107 #define SkASSERT(cond) SK_ALWAYSBREAK(cond) | 107 #define SkASSERT(cond) SK_ALWAYSBREAK(cond) |
108 #define SkDEBUGFAIL(message) SkASSERT(false && message) | 108 #define SkDEBUGFAIL(message) SkASSERT(false && message) |
| 109 #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) |
109 #define SkDEBUGCODE(code) code | 110 #define SkDEBUGCODE(code) code |
110 #define SkDECLAREPARAM(type, var) , type var | 111 #define SkDECLAREPARAM(type, var) , type var |
111 #define SkPARAM(var) , var | 112 #define SkPARAM(var) , var |
112 // #define SkDEBUGF(args ) SkDebugf##args | 113 // #define SkDEBUGF(args ) SkDebugf##args |
113 #define SkDEBUGF(args ) SkDebugf args | 114 #define SkDEBUGF(args ) SkDebugf args |
114 #define SkAssertResult(cond) SkASSERT(cond) | 115 #define SkAssertResult(cond) SkASSERT(cond) |
115 #else | 116 #else |
116 #define SkASSERT(cond) | 117 #define SkASSERT(cond) |
117 #define SkDEBUGFAIL(message) | 118 #define SkDEBUGFAIL(message) |
118 #define SkDEBUGCODE(code) | 119 #define SkDEBUGCODE(code) |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 private: | 658 private: |
658 void* fPtr; | 659 void* fPtr; |
659 size_t fSize; // can be larger than the requested size (see kReuse) | 660 size_t fSize; // can be larger than the requested size (see kReuse) |
660 uint32_t fStorage[(kSize + 3) >> 2]; | 661 uint32_t fStorage[(kSize + 3) >> 2]; |
661 }; | 662 }; |
662 // Can't guard the constructor because it's a template class. | 663 // Can't guard the constructor because it's a template class. |
663 | 664 |
664 #endif /* C++ */ | 665 #endif /* C++ */ |
665 | 666 |
666 #endif | 667 #endif |
OLD | NEW |