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

Side by Side Diff: include/core/SkTypes.h

Issue 2039443002: fix windows assert (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTypes_DEFINED 8 #ifndef SkTypes_DEFINED
9 #define SkTypes_DEFINED 9 #define SkTypes_DEFINED
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 #define SK_INIT_TO_AVOID_WARNING = 0 125 #define SK_INIT_TO_AVOID_WARNING = 0
126 126
127 #ifndef SkDebugf 127 #ifndef SkDebugf
128 SK_API void SkDebugf(const char format[], ...); 128 SK_API void SkDebugf(const char format[], ...);
129 #endif 129 #endif
130 130
131 #define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); } 131 #define SkASSERT_RELEASE(cond) if(!(cond)) { SK_ABORT(#cond); }
132 132
133 #ifdef SK_DEBUG 133 #ifdef SK_DEBUG
134 #define SkASSERT(cond) SkASSERT_RELEASE(cond) 134 #if defined SK_BUILD_FOR_WIN
135 #define SkASSERT(cond) if(!(cond)) { __debugbreak(); }
136 #else
137 #define SkASSERT(cond) SkASSERT_RELEASE(cond)
138 #endif
135 #define SkDEBUGFAIL(message) SkASSERT(false && message) 139 #define SkDEBUGFAIL(message) SkASSERT(false && message)
136 #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) 140 #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__)
137 #define SkDEBUGCODE(code) code 141 #define SkDEBUGCODE(code) code
138 #define SkDECLAREPARAM(type, var) , type var 142 #define SkDECLAREPARAM(type, var) , type var
139 #define SkPARAM(var) , var 143 #define SkPARAM(var) , var
140 // #define SkDEBUGF(args ) SkDebugf##args 144 // #define SkDEBUGF(args ) SkDebugf##args
141 #define SkDEBUGF(args ) SkDebugf args 145 #define SkDEBUGF(args ) SkDebugf args
142 #define SkAssertResult(cond) SkASSERT(cond) 146 #define SkAssertResult(cond) SkASSERT(cond)
143 #else 147 #else
144 #define SkASSERT(cond) 148 #define SkASSERT(cond)
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 705
702 void* fPtr; 706 void* fPtr;
703 size_t fSize; // can be larger than the requested size (see kReuse) 707 size_t fSize; // can be larger than the requested size (see kReuse)
704 uint32_t fStorage[kSize >> 2]; 708 uint32_t fStorage[kSize >> 2];
705 }; 709 };
706 // Can't guard the constructor because it's a template class. 710 // Can't guard the constructor because it's a template class.
707 711
708 #endif /* C++ */ 712 #endif /* C++ */
709 713
710 #endif 714 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698