| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 #if GR_DEBUG | 269 #if GR_DEBUG |
| 270 #define GR_DEBUGASSERT(COND) GR_ALWAYSASSERT(COND) | 270 #define GR_DEBUGASSERT(COND) GR_ALWAYSASSERT(COND) |
| 271 #else | 271 #else |
| 272 #define GR_DEBUGASSERT(COND) | 272 #define GR_DEBUGASSERT(COND) |
| 273 #endif | 273 #endif |
| 274 #endif | 274 #endif |
| 275 | 275 |
| 276 /** | 276 /** |
| 277 * Prettier forms of the above macros. | 277 * Prettier forms of the above macros. |
| 278 */ | 278 */ |
| 279 #define GrAssert(COND) GR_DEBUGASSERT(COND) | |
| 280 #define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND) | 279 #define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND) |
| 281 | 280 |
| 282 /** | 281 /** |
| 283 * Crash from unrecoverable condition, optionally with a message. The debug vari
ants only | 282 * Crash from unrecoverable condition, optionally with a message. The debug vari
ants only |
| 284 * crash in a debug build. The message versions print the message regardless of
release vs debug. | 283 * crash in a debug build. The message versions print the message regardless of
release vs debug. |
| 285 */ | 284 */ |
| 286 inline void GrCrash() { GrAlwaysAssert(false); } | 285 inline void GrCrash() { GrAlwaysAssert(false); } |
| 287 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } | 286 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } |
| 288 inline void GrDebugCrash() { GrAssert(false); } | 287 inline void GrDebugCrash() { SkASSERT(false); } |
| 289 inline void GrDebugCrash(const char* msg) { GrPrintf(msg); GrAssert(false); } | 288 inline void GrDebugCrash(const char* msg) { GrPrintf(msg); SkASSERT(false); } |
| 290 | 289 |
| 291 /** | 290 /** |
| 292 * GR_DEBUGCODE compiles the code X in debug builds only | 291 * GR_DEBUGCODE compiles the code X in debug builds only |
| 293 */ | 292 */ |
| 294 #if !defined(GR_DEBUGCODE) | 293 #if !defined(GR_DEBUGCODE) |
| 295 #if GR_DEBUG | 294 #if GR_DEBUG |
| 296 #define GR_DEBUGCODE(X) X | 295 #define GR_DEBUGCODE(X) X |
| 297 #else | 296 #else |
| 298 #define GR_DEBUGCODE(X) | 297 #define GR_DEBUGCODE(X) |
| 299 #endif | 298 #endif |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 #endif | 377 #endif |
| 379 #if GR_LINUX_BUILD | 378 #if GR_LINUX_BUILD |
| 380 // #pragma message GR_WARN("GR_LINUX_BUILD") | 379 // #pragma message GR_WARN("GR_LINUX_BUILD") |
| 381 #endif | 380 #endif |
| 382 #if GR_QNX_BUILD | 381 #if GR_QNX_BUILD |
| 383 // #pragma message GR_WARN("GR_QNX_BUILD") | 382 // #pragma message GR_WARN("GR_QNX_BUILD") |
| 384 #endif | 383 #endif |
| 385 #endif | 384 #endif |
| 386 | 385 |
| 387 #endif | 386 #endif |
| OLD | NEW |