Chromium Code Reviews| Index: include/core/SkPostConfig.h |
| diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h |
| index 0aa6c18e31aba52229d12f03e18d9fc8f6e34262..63637e5c503df5f16f9aa1a3329c0f1bae077a3b 100644 |
| --- a/include/core/SkPostConfig.h |
| +++ b/include/core/SkPostConfig.h |
| @@ -381,6 +381,15 @@ |
| ////////////////////////////////////////////////////////////////////// |
| +#if defined(__clang__) || defined(__GNUC__) |
|
Nico
2013/11/12 05:23:09
clang defines __GNUC__ too, no need to check for i
|
| +#define SK_PREFETCH(ptr) __builtin_prefetch(ptr) |
| +#define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) |
| +#else |
| +#define SK_PREFETCH(ptr) |
| +#define SK_WRITE_PREFETCH(ptr) |
| +#endif |
| + |
| +////////////////////////////////////////////////////////////////////// |
| #ifndef SK_PRINTF_LIKE |
| #if defined(__clang__) || defined(__GNUC__) |
| #define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B)))) |