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 #ifndef SkPostConfig_DEFINED | 8 #ifndef SkPostConfig_DEFINED |
9 #define SkPostConfig_DEFINED | 9 #define SkPostConfig_DEFINED |
10 | 10 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined | 290 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined |
291 */ | 291 */ |
292 #if !defined(SK_ALWAYS_INLINE) | 292 #if !defined(SK_ALWAYS_INLINE) |
293 # if defined(SK_BUILD_FOR_WIN) | 293 # if defined(SK_BUILD_FOR_WIN) |
294 # define SK_ALWAYS_INLINE __forceinline | 294 # define SK_ALWAYS_INLINE __forceinline |
295 # else | 295 # else |
296 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline | 296 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline |
297 # endif | 297 # endif |
298 #endif | 298 #endif |
299 | 299 |
300 #if defined(SK_BUILD_FOR_WIN) | |
301 #define SK_VECTORCALL __vectorcall | |
302 #elif defined(SK_CPU_ARM32) | |
303 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) | |
304 #else | |
305 #define SK_VECTORCALL | |
306 #endif | |
307 | |
308 ////////////////////////////////////////////////////////////////////// | 300 ////////////////////////////////////////////////////////////////////// |
309 | 301 |
310 #if defined(__clang__) || defined(__GNUC__) | 302 #if defined(__clang__) || defined(__GNUC__) |
311 # define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | 303 # define SK_PREFETCH(ptr) __builtin_prefetch(ptr) |
312 # define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | 304 # define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) |
313 #else | 305 #else |
314 # define SK_PREFETCH(ptr) | 306 # define SK_PREFETCH(ptr) |
315 # define SK_WRITE_PREFETCH(ptr) | 307 # define SK_WRITE_PREFETCH(ptr) |
316 #endif | 308 #endif |
317 | 309 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 # define SK_GAMMA_EXPONENT (2.2f) | 353 # define SK_GAMMA_EXPONENT (2.2f) |
362 #endif | 354 #endif |
363 | 355 |
364 ////////////////////////////////////////////////////////////////////// | 356 ////////////////////////////////////////////////////////////////////// |
365 | 357 |
366 #ifndef GR_TEST_UTILS | 358 #ifndef GR_TEST_UTILS |
367 # define GR_TEST_UTILS 1 | 359 # define GR_TEST_UTILS 1 |
368 #endif | 360 #endif |
369 | 361 |
370 #endif // SkPostConfig_DEFINED | 362 #endif // SkPostConfig_DEFINED |
OLD | NEW |