OLD | NEW |
---|---|
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 // IWYU pragma: private, include "SkTypes.h" | 8 // IWYU pragma: private, include "SkTypes.h" |
9 | 9 |
10 #ifndef SkPostConfig_DEFINED | 10 #ifndef SkPostConfig_DEFINED |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 #if defined(SK_BUILD_FOR_WIN) | 288 #if defined(SK_BUILD_FOR_WIN) |
289 #define SK_VECTORCALL __vectorcall | 289 #define SK_VECTORCALL __vectorcall |
290 #elif defined(SK_CPU_ARM32) | 290 #elif defined(SK_CPU_ARM32) |
291 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) | 291 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) |
292 #else | 292 #else |
293 #define SK_VECTORCALL | 293 #define SK_VECTORCALL |
294 #endif | 294 #endif |
295 | 295 |
296 ////////////////////////////////////////////////////////////////////// | 296 ////////////////////////////////////////////////////////////////////// |
297 | 297 |
298 #if defined(__clang__) || defined(__GNUC__) | 298 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 |
299 # define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | 299 #define SK_PREFETCH(ptr) _mm_prefetch(ptr, _MM_HINT_T0) |
300 # define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | 300 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(ptr, _MM_HINT_T0) |
301 #elif defined(__GNUC__) | |
Stephen White
2015/10/27 20:03:20
We don't need "define(__clang__) ||" here anymore?
mtklein
2015/10/27 20:05:55
Nah, Clang defines __GNUC__. Seemed confusing to
| |
302 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | |
303 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | |
301 #else | 304 #else |
302 # define SK_PREFETCH(ptr) | 305 #define SK_PREFETCH(ptr) |
303 # define SK_WRITE_PREFETCH(ptr) | 306 #define SK_WRITE_PREFETCH(ptr) |
304 #endif | 307 #endif |
305 | 308 |
306 ////////////////////////////////////////////////////////////////////// | 309 ////////////////////////////////////////////////////////////////////// |
307 | 310 |
308 #ifndef SK_PRINTF_LIKE | 311 #ifndef SK_PRINTF_LIKE |
309 # if defined(__clang__) || defined(__GNUC__) | 312 # if defined(__clang__) || defined(__GNUC__) |
310 # define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B)))) | 313 # define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B)))) |
311 # else | 314 # else |
312 # define SK_PRINTF_LIKE(A, B) | 315 # define SK_PRINTF_LIKE(A, B) |
313 # endif | 316 # endif |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 # define SK_GAMMA_EXPONENT (2.2f) | 352 # define SK_GAMMA_EXPONENT (2.2f) |
350 #endif | 353 #endif |
351 | 354 |
352 ////////////////////////////////////////////////////////////////////// | 355 ////////////////////////////////////////////////////////////////////// |
353 | 356 |
354 #ifndef GR_TEST_UTILS | 357 #ifndef GR_TEST_UTILS |
355 # define GR_TEST_UTILS 1 | 358 # define GR_TEST_UTILS 1 |
356 #endif | 359 #endif |
357 | 360 |
358 #endif // SkPostConfig_DEFINED | 361 #endif // SkPostConfig_DEFINED |
OLD | NEW |