| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) | 279 #define GrAssert(COND) GR_DEBUGASSERT(COND) |
| 280 #define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND) | 280 #define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND) |
| 281 | 281 |
| 282 /** | 282 /** |
| 283 * Crash from unrecoverable condition, optionally with a message. | 283 * 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. |
| 284 */ | 285 */ |
| 285 inline void GrCrash() { GrAlwaysAssert(false); } | 286 inline void GrCrash() { GrAlwaysAssert(false); } |
| 286 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } | 287 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } |
| 288 inline void GrDebugCrash() { GrAssert(false); } |
| 289 inline void GrDebugCrash(const char* msg) { GrPrintf(msg); GrAssert(false); } |
| 287 | 290 |
| 288 /** | 291 /** |
| 289 * GR_DEBUGCODE compiles the code X in debug builds only | 292 * GR_DEBUGCODE compiles the code X in debug builds only |
| 290 */ | 293 */ |
| 291 #if !defined(GR_DEBUGCODE) | 294 #if !defined(GR_DEBUGCODE) |
| 292 #if GR_DEBUG | 295 #if GR_DEBUG |
| 293 #define GR_DEBUGCODE(X) X | 296 #define GR_DEBUGCODE(X) X |
| 294 #else | 297 #else |
| 295 #define GR_DEBUGCODE(X) | 298 #define GR_DEBUGCODE(X) |
| 296 #endif | 299 #endif |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 #endif | 378 #endif |
| 376 #if GR_LINUX_BUILD | 379 #if GR_LINUX_BUILD |
| 377 // #pragma message GR_WARN("GR_LINUX_BUILD") | 380 // #pragma message GR_WARN("GR_LINUX_BUILD") |
| 378 #endif | 381 #endif |
| 379 #if GR_QNX_BUILD | 382 #if GR_QNX_BUILD |
| 380 // #pragma message GR_WARN("GR_QNX_BUILD") | 383 // #pragma message GR_WARN("GR_QNX_BUILD") |
| 381 #endif | 384 #endif |
| 382 #endif | 385 #endif |
| 383 | 386 |
| 384 #endif | 387 #endif |
| OLD | NEW |