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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, | 179 SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal, |
180 const char* format, ...); | 180 const char* format, ...); |
181 | 181 |
182 // Marking the debug print as "fatal" will cause a debug break, so we don't need | 182 // Marking the debug print as "fatal" will cause a debug break, so we don't need |
183 // a separate crash call here. | 183 // a separate crash call here. |
184 #define SK_DEBUGBREAK(cond) do { if (!(cond)) { \ | 184 #define SK_DEBUGBREAK(cond) do { if (!(cond)) { \ |
185 SkDebugf_FileLine(__FILE__, __LINE__, true, \ | 185 SkDebugf_FileLine(__FILE__, __LINE__, true, \ |
186 "%s:%d: failed assertion \"%s\"\n", \ | 186 "%s:%d: failed assertion \"%s\"\n", \ |
187 __FILE__, __LINE__, #cond); } } while (false) | 187 __FILE__, __LINE__, #cond); } } while (false) |
188 | 188 |
189 #if !defined(ANDROID) // On Android, we use the skia default settings | |
Nico
2012/07/24 01:20:27
Nit: trailing .
michaelbai
2012/07/24 01:37:47
Done.
| |
189 // All little-endian Chrome platforms agree: BGRA is the optimal pixel layout. | 190 // All little-endian Chrome platforms agree: BGRA is the optimal pixel layout. |
Nico
2012/07/24 01:20:27
remove this comment
michaelbai
2012/07/24 01:37:47
Done.
| |
190 #define SK_A32_SHIFT 24 | 191 #define SK_A32_SHIFT 24 |
191 #define SK_R32_SHIFT 16 | 192 #define SK_R32_SHIFT 16 |
192 #define SK_G32_SHIFT 8 | 193 #define SK_G32_SHIFT 8 |
193 #define SK_B32_SHIFT 0 | 194 #define SK_B32_SHIFT 0 |
195 #endif | |
194 | 196 |
195 #if defined(SK_BUILD_FOR_WIN32) | 197 #if defined(SK_BUILD_FOR_WIN32) |
196 | 198 |
197 #define SK_BUILD_FOR_WIN | 199 #define SK_BUILD_FOR_WIN |
198 | 200 |
199 // VC8 doesn't support stdint.h, so we define those types here. | 201 // VC8 doesn't support stdint.h, so we define those types here. |
200 #define SK_IGNORE_STDINT_DOT_H | 202 #define SK_IGNORE_STDINT_DOT_H |
201 typedef signed char int8_t; | 203 typedef signed char int8_t; |
202 typedef unsigned char uint8_t; | 204 typedef unsigned char uint8_t; |
203 typedef short int16_t; | 205 typedef short int16_t; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 // assertion. | 244 // assertion. |
243 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") | 245 #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") |
244 | 246 |
245 // Uncomment the following line to forward skia trace events to Chrome | 247 // Uncomment the following line to forward skia trace events to Chrome |
246 // tracing. | 248 // tracing. |
247 // #define SK_USER_TRACE_INCLUDE_FILE "skia/ext/skia_trace_shim.h" | 249 // #define SK_USER_TRACE_INCLUDE_FILE "skia/ext/skia_trace_shim.h" |
248 | 250 |
249 // ===== End Chrome-specific definitions ===== | 251 // ===== End Chrome-specific definitions ===== |
250 | 252 |
251 #endif | 253 #endif |
OLD | NEW |