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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined | 293 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined |
294 */ | 294 */ |
295 #if !defined(SK_ALWAYS_INLINE) | 295 #if !defined(SK_ALWAYS_INLINE) |
296 # if defined(SK_BUILD_FOR_WIN) | 296 # if defined(SK_BUILD_FOR_WIN) |
297 # define SK_ALWAYS_INLINE __forceinline | 297 # define SK_ALWAYS_INLINE __forceinline |
298 # else | 298 # else |
299 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline | 299 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline |
300 # endif | 300 # endif |
301 #endif | 301 #endif |
302 | 302 |
303 #if defined(SK_BUILD_FOR_WIN) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 | |
304 #define SK_VECTORCALL __vectorcall | |
305 #elif defined(SK_CPU_ARM32) | |
306 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) | |
307 #else | |
308 #define SK_VECTORCALL | |
309 #endif | |
310 | |
311 ////////////////////////////////////////////////////////////////////// | 303 ////////////////////////////////////////////////////////////////////// |
312 | 304 |
313 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 | 305 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 |
314 #define SK_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) | 306 #define SK_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) |
315 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) | 307 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) |
316 #elif defined(__GNUC__) | 308 #elif defined(__GNUC__) |
317 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | 309 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) |
318 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | 310 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) |
319 #else | 311 #else |
320 #define SK_PREFETCH(ptr) | 312 #define SK_PREFETCH(ptr) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 # define SK_GAMMA_EXPONENT (2.2f) | 359 # define SK_GAMMA_EXPONENT (2.2f) |
368 #endif | 360 #endif |
369 | 361 |
370 ////////////////////////////////////////////////////////////////////// | 362 ////////////////////////////////////////////////////////////////////// |
371 | 363 |
372 #ifndef GR_TEST_UTILS | 364 #ifndef GR_TEST_UTILS |
373 # define GR_TEST_UTILS 1 | 365 # define GR_TEST_UTILS 1 |
374 #endif | 366 #endif |
375 | 367 |
376 #endif // SkPostConfig_DEFINED | 368 #endif // SkPostConfig_DEFINED |
OLD | NEW |