Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: include/gpu/GrConfig.h

Issue 23703010: Replace uses of GR_DEBUGCODE by SkDEBUGCODE. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/gpu/GrBackendEffectFactory.h ('k') | include/gpu/GrEffectStage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 /** 229 /**
230 * Crash from unrecoverable condition, optionally with a message. The debug vari ants only 230 * Crash from unrecoverable condition, optionally with a message. The debug vari ants only
231 * crash in a debug build. The message versions print the message regardless of release vs debug. 231 * crash in a debug build. The message versions print the message regardless of release vs debug.
232 */ 232 */
233 inline void GrCrash() { GrAlwaysAssert(false); } 233 inline void GrCrash() { GrAlwaysAssert(false); }
234 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); } 234 inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); }
235 inline void GrDebugCrash() { SkASSERT(false); } 235 inline void GrDebugCrash() { SkASSERT(false); }
236 inline void GrDebugCrash(const char* msg) { GrPrintf(msg); SkASSERT(false); } 236 inline void GrDebugCrash(const char* msg) { GrPrintf(msg); SkASSERT(false); }
237 237
238 /** 238 /**
239 * GR_DEBUGCODE compiles the code X in debug builds only
240 */
241 #if !defined(GR_DEBUGCODE)
242 #ifdef SK_DEBUG
243 #define GR_DEBUGCODE(X) X
244 #else
245 #define GR_DEBUGCODE(X)
246 #endif
247 #endif
248
249 /**
250 * GR_STATIC_ASSERT is a compile time assertion. Depending on the platform 239 * GR_STATIC_ASSERT is a compile time assertion. Depending on the platform
251 * it may print the message in the compiler log. Obviously, the condition must 240 * it may print the message in the compiler log. Obviously, the condition must
252 * be evaluatable at compile time. 241 * be evaluatable at compile time.
253 */ 242 */
254 // VS 2010 and GCC compiled with c++0x or gnu++0x support the new 243 // VS 2010 and GCC compiled with c++0x or gnu++0x support the new
255 // static_assert. 244 // static_assert.
256 #if !defined(GR_STATIC_ASSERT) 245 #if !defined(GR_STATIC_ASSERT)
257 #if (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__GXX_EXPERIMENTAL_C XX0X__) && __GXX_EXPERIMENTAL_CXX0X__) 246 #if (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__GXX_EXPERIMENTAL_C XX0X__) && __GXX_EXPERIMENTAL_CXX0X__)
258 #define GR_STATIC_ASSERT(CONDITION) static_assert(CONDITION, "bug") 247 #define GR_STATIC_ASSERT(CONDITION) static_assert(CONDITION, "bug")
259 #else 248 #else
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 #endif 314 #endif
326 #if GR_LINUX_BUILD 315 #if GR_LINUX_BUILD
327 // #pragma message GR_WARN("GR_LINUX_BUILD") 316 // #pragma message GR_WARN("GR_LINUX_BUILD")
328 #endif 317 #endif
329 #if GR_QNX_BUILD 318 #if GR_QNX_BUILD
330 // #pragma message GR_WARN("GR_QNX_BUILD") 319 // #pragma message GR_WARN("GR_QNX_BUILD")
331 #endif 320 #endif
332 #endif 321 #endif
333 322
334 #endif 323 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrBackendEffectFactory.h ('k') | include/gpu/GrEffectStage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698