OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 The Android Open Source Project | 2 * Copyright (C) 2006 The Android Open Source Project |
3 * | 3 * |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | 4 * Licensed under the Apache License, Version 2.0 (the "License"); |
5 * you may not use this file except in compliance with the License. | 5 * you may not use this file except in compliance with the License. |
6 * You may obtain a copy of the License at | 6 * You may obtain a copy of the License at |
7 * | 7 * |
8 * http://www.apache.org/licenses/LICENSE-2.0 | 8 * http://www.apache.org/licenses/LICENSE-2.0 |
9 * | 9 * |
10 * Unless required by applicable law or agreed to in writing, software | 10 * Unless required by applicable law or agreed to in writing, software |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 */ | 136 */ |
137 #define SK_DISABLE_DITHER_32BIT_GRADIENT | 137 #define SK_DISABLE_DITHER_32BIT_GRADIENT |
138 | 138 |
139 // ===== Begin Chrome-specific definitions ===== | 139 // ===== Begin Chrome-specific definitions ===== |
140 | 140 |
141 #define SK_SCALAR_IS_FLOAT | 141 #define SK_SCALAR_IS_FLOAT |
142 #undef SK_SCALAR_IS_FIXED | 142 #undef SK_SCALAR_IS_FIXED |
143 | 143 |
144 // Log the file and line number for assertions. | 144 // Log the file and line number for assertions. |
145 #define SkDebugf(...) SkDebugf_FileLine(__FILE__, __LINE__, false, __VA_ARGS__) | 145 #define SkDebugf(...) SkDebugf_FileLine(__FILE__, __LINE__, false, __VA_ARGS__) |
146 void SkDebugf_FileLine(const char* file, int line, bool fatal, | 146 SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, |
147 const char* format, ...); | 147 const char* format, ...); |
148 | 148 |
149 // Marking the debug print as "fatal" will cause a debug break, so we don't need | 149 // Marking the debug print as "fatal" will cause a debug break, so we don't need |
150 // a separate crash call here. | 150 // a separate crash call here. |
151 #define SK_DEBUGBREAK(cond) do { if (!(cond)) { \ | 151 #define SK_DEBUGBREAK(cond) do { if (!(cond)) { \ |
152 SkDebugf_FileLine(__FILE__, __LINE__, true, \ | 152 SkDebugf_FileLine(__FILE__, __LINE__, true, \ |
153 "%s:%d: failed assertion \"%s\"\n", \ | 153 "%s:%d: failed assertion \"%s\"\n", \ |
154 __FILE__, __LINE__, #cond); } } while (false) | 154 __FILE__, __LINE__, #cond); } } while (false) |
155 | 155 |
156 // All little-endian Chrome platforms agree: BGRA is the optimal pixel layout. | 156 // All little-endian Chrome platforms agree: BGRA is the optimal pixel layout. |
157 #define SK_A32_SHIFT 24 | 157 #define SK_A32_SHIFT 24 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 #endif | 204 #endif |
205 | 205 |
206 // The default crash macro writes to badbeef which can cause some strange | 206 // The default crash macro writes to badbeef which can cause some strange |
207 // problems. Instead, pipe this through to the logging function as a fatal | 207 // problems. Instead, pipe this through to the logging function as a fatal |
208 // assertion. | 208 // assertion. |
209 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") | 209 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") |
210 | 210 |
211 // ===== End Chrome-specific definitions ===== | 211 // ===== End Chrome-specific definitions ===== |
212 | 212 |
213 #endif | 213 #endif |
OLD | NEW |