diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTypes.h | 2 | ||||
-rw-r--r-- | include/gpu/GrColor.h | 2 | ||||
-rw-r--r-- | include/gpu/GrConfig.h | 9 | ||||
-rw-r--r-- | include/gpu/GrContextFactory.h | 2 | ||||
-rw-r--r-- | include/gpu/GrTypesPriv.h | 2 |
5 files changed, 5 insertions, 12 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 13450cd011..8863b07326 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -113,6 +113,8 @@ inline void operator delete(void* p) { #define SkAssertResult(cond) cond #endif +#define SkFAIL(message) SK_DEBUGBREAK(false && message) + #ifdef SK_DEVELOPER #define SkDEVCODE(code) code #else diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h index b0bce3f9b5..183781ac3e 100644 --- a/include/gpu/GrColor.h +++ b/include/gpu/GrColor.h @@ -117,7 +117,7 @@ static inline char GrColorComponentFlagToChar(GrColorComponentFlags component) { case kA_GrColorComponentFlag: return 'a'; default: - GrCrash("Invalid color component flag."); + SkFAIL("Invalid color component flag."); return '\0'; } } diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h index fc464c5038..cbdb3503c2 100644 --- a/include/gpu/GrConfig.h +++ b/include/gpu/GrConfig.h @@ -178,15 +178,6 @@ typedef unsigned __int64 uint64_t; #define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND) /** - * Crash from unrecoverable condition, optionally with a message. The debug variants only - * crash in a debug build. The message versions print the message regardless of release vs debug. - */ -inline void GrCrash() { GrAlwaysAssert(false); } -inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } -inline void GrDebugCrash() { SkASSERT(false); } -inline void GrDebugCrash(const char* msg) { GrPrintf(msg); SkASSERT(false); } - -/** * GR_STATIC_ASSERT is a compile time assertion. Depending on the platform * it may print the message in the compiler log. Obviously, the condition must * be evaluatable at compile time. diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h index 916d5df879..f09bad932b 100644 --- a/include/gpu/GrContextFactory.h +++ b/include/gpu/GrContextFactory.h @@ -84,7 +84,7 @@ public: case kDebug_GLContextType: return "debug"; default: - GrCrash("Unknown GL Context type."); + SkFAIL("Unknown GL Context type."); } } diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h index f09f95d918..dfe415345a 100644 --- a/include/gpu/GrTypesPriv.h +++ b/include/gpu/GrTypesPriv.h @@ -212,7 +212,7 @@ static inline GrEffectEdgeType GrInvertEffectEdgeType(const GrEffectEdgeType edg case kInverseFillAA_GrEffectEdgeType: return kFillAA_GrEffectEdgeType; case kHairlineAA_GrEffectEdgeType: - GrCrash("Hairline fill isn't invertible."); + SkFAIL("Hairline fill isn't invertible."); } return kFillAA_GrEffectEdgeType; // suppress warning. } |