diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 14:17:00 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 14:17:00 +0000 |
commit | 6cba7b9782550e1bfeacda5db7327c08efd073e7 (patch) | |
tree | c734046596c133018b2ce7ca31ca25e5ac9415cb | |
parent | 394ec1d498fc2f93a45c150aa8ad24bec26c3760 (diff) | |
download | include-6cba7b9782550e1bfeacda5db7327c08efd073e7.tar.gz |
Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL
R=robertphillips@google.com, reed@google.com, mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/257393004
git-svn-id: http://skia.googlecode.com/svn/trunk/include@14460 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | core/SkTypes.h | 2 | ||||
-rw-r--r-- | gpu/GrColor.h | 2 | ||||
-rw-r--r-- | gpu/GrConfig.h | 9 | ||||
-rw-r--r-- | gpu/GrContextFactory.h | 2 | ||||
-rw-r--r-- | gpu/GrTypesPriv.h | 2 |
5 files changed, 5 insertions, 12 deletions
diff --git a/core/SkTypes.h b/core/SkTypes.h index 13450cd..8863b07 100644 --- a/core/SkTypes.h +++ b/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/gpu/GrColor.h b/gpu/GrColor.h index b0bce3f..183781a 100644 --- a/gpu/GrColor.h +++ b/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/gpu/GrConfig.h b/gpu/GrConfig.h index fc464c5..cbdb350 100644 --- a/gpu/GrConfig.h +++ b/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/gpu/GrContextFactory.h b/gpu/GrContextFactory.h index 916d5df..f09bad9 100644 --- a/gpu/GrContextFactory.h +++ b/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/gpu/GrTypesPriv.h b/gpu/GrTypesPriv.h index f09f95d..dfe4153 100644 --- a/gpu/GrTypesPriv.h +++ b/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. } |