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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #endif | 70 #endif |
71 | 71 |
72 #if !defined(SK_ATTRIBUTE) | 72 #if !defined(SK_ATTRIBUTE) |
73 # if defined(__clang__) || defined(__GNUC__) | 73 # if defined(__clang__) || defined(__GNUC__) |
74 # define SK_ATTRIBUTE(attr) __attribute__((attr)) | 74 # define SK_ATTRIBUTE(attr) __attribute__((attr)) |
75 # else | 75 # else |
76 # define SK_ATTRIBUTE(attr) | 76 # define SK_ATTRIBUTE(attr) |
77 # endif | 77 # endif |
78 #endif | 78 #endif |
79 | 79 |
| 80 // As usual, there are two ways to increase alignment... the MSVC way and the ev
eryone-else way. |
| 81 #ifndef SK_STRUCT_ALIGN |
| 82 #ifdef _MSC_VER |
| 83 #define SK_STRUCT_ALIGN(N) __declspec(align(N)) |
| 84 #else |
| 85 #define SK_STRUCT_ALIGN(N) __attribute__((aligned(N))) |
| 86 #endif |
| 87 #endif |
| 88 |
80 #if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 | 89 #if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
81 #define SK_VECTORCALL __vectorcall | 90 #define SK_VECTORCALL __vectorcall |
82 #elif defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON) | 91 #elif defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON) |
83 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) | 92 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) |
84 #else | 93 #else |
85 #define SK_VECTORCALL | 94 #define SK_VECTORCALL |
86 #endif | 95 #endif |
87 | 96 |
88 #if !defined(SK_SUPPORT_GPU) | 97 #if !defined(SK_SUPPORT_GPU) |
89 # define SK_SUPPORT_GPU 1 | 98 # define SK_SUPPORT_GPU 1 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 362 |
354 #ifndef SK_HISTOGRAM_BOOLEAN | 363 #ifndef SK_HISTOGRAM_BOOLEAN |
355 # define SK_HISTOGRAM_BOOLEAN(name, value) | 364 # define SK_HISTOGRAM_BOOLEAN(name, value) |
356 #endif | 365 #endif |
357 | 366 |
358 #ifndef SK_HISTOGRAM_ENUMERATION | 367 #ifndef SK_HISTOGRAM_ENUMERATION |
359 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) | 368 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) |
360 #endif | 369 #endif |
361 | 370 |
362 #endif // SkPostConfig_DEFINED | 371 #endif // SkPostConfig_DEFINED |
OLD | NEW |