| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 /////////////////////////////////////////////////////////////////////////////// | 87 /////////////////////////////////////////////////////////////////////////////// |
| 88 | 88 |
| 89 #define SK_INIT_TO_AVOID_WARNING = 0 | 89 #define SK_INIT_TO_AVOID_WARNING = 0 |
| 90 | 90 |
| 91 #ifndef SkDebugf | 91 #ifndef SkDebugf |
| 92 void SkDebugf(const char format[], ...); | 92 void SkDebugf(const char format[], ...); |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 #ifdef SK_DEBUG | 95 #ifdef SK_DEBUG |
| 96 #define SkASSERT(cond) SK_ALWAYSBREAK(cond) | 96 #define SkASSERT(cond) SK_DEBUGBREAK(cond) |
| 97 #define SkDEBUGFAIL(message) SkASSERT(false && message) | 97 #define SkDEBUGFAIL(message) SkASSERT(false && message) |
| 98 #define SkDEBUGCODE(code) code | 98 #define SkDEBUGCODE(code) code |
| 99 #define SkDECLAREPARAM(type, var) , type var | 99 #define SkDECLAREPARAM(type, var) , type var |
| 100 #define SkPARAM(var) , var | 100 #define SkPARAM(var) , var |
| 101 // #define SkDEBUGF(args ) SkDebugf##args | 101 // #define SkDEBUGF(args ) SkDebugf##args |
| 102 #define SkDEBUGF(args ) SkDebugf args | 102 #define SkDEBUGF(args ) SkDebugf args |
| 103 #define SkAssertResult(cond) SkASSERT(cond) | 103 #define SkAssertResult(cond) SkASSERT(cond) |
| 104 #else | 104 #else |
| 105 #define SkASSERT(cond) | 105 #define SkASSERT(cond) |
| 106 #define SkDEBUGFAIL(message) | 106 #define SkDEBUGFAIL(message) |
| 107 #define SkDEBUGCODE(code) | 107 #define SkDEBUGCODE(code) |
| 108 #define SkDEBUGF(args) | 108 #define SkDEBUGF(args) |
| 109 #define SkDECLAREPARAM(type, var) | 109 #define SkDECLAREPARAM(type, var) |
| 110 #define SkPARAM(var) | 110 #define SkPARAM(var) |
| 111 | 111 |
| 112 // unlike SkASSERT, this guy executes its condition in the non-debug build | 112 // unlike SkASSERT, this guy executes its condition in the non-debug build |
| 113 #define SkAssertResult(cond) cond | 113 #define SkAssertResult(cond) cond |
| 114 #endif | 114 #endif |
| 115 | 115 |
| 116 #define SkFAIL(message) SK_ALWAYSBREAK(false && message) | 116 #define SkFAIL(message) SK_DEBUGBREAK(false && message) |
| 117 | 117 |
| 118 #ifdef SK_DEVELOPER | 118 #ifdef SK_DEVELOPER |
| 119 #define SkDEVCODE(code) code | 119 #define SkDEVCODE(code) code |
| 120 #else | 120 #else |
| 121 #define SkDEVCODE(code) | 121 #define SkDEVCODE(code) |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 #ifdef SK_IGNORE_TO_STRING | 124 #ifdef SK_IGNORE_TO_STRING |
| 125 #define SK_TO_STRING_NONVIRT() | 125 #define SK_TO_STRING_NONVIRT() |
| 126 #define SK_TO_STRING_VIRT() | 126 #define SK_TO_STRING_VIRT() |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 private: | 657 private: |
| 658 void* fPtr; | 658 void* fPtr; |
| 659 size_t fSize; // can be larger than the requested size (see kReuse) | 659 size_t fSize; // can be larger than the requested size (see kReuse) |
| 660 uint32_t fStorage[(kSize + 3) >> 2]; | 660 uint32_t fStorage[(kSize + 3) >> 2]; |
| 661 }; | 661 }; |
| 662 // Can't guard the constructor because it's a template class. | 662 // Can't guard the constructor because it's a template class. |
| 663 | 663 |
| 664 #endif /* C++ */ | 664 #endif /* C++ */ |
| 665 | 665 |
| 666 #endif | 666 #endif |
| OLD | NEW |