OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPreConfig_DEFINED | 10 #ifndef SkPreConfig_DEFINED |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 #endif | 135 #endif |
136 | 136 |
137 // 64bit intel guarantees at least SSE2 | 137 // 64bit intel guarantees at least SSE2 |
138 #if defined(__x86_64__) || defined(_WIN64) | 138 #if defined(__x86_64__) || defined(_WIN64) |
139 #if !defined(SK_CPU_SSE_LEVEL) || (SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSE2) | 139 #if !defined(SK_CPU_SSE_LEVEL) || (SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSE2) |
140 #undef SK_CPU_SSE_LEVEL | 140 #undef SK_CPU_SSE_LEVEL |
141 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2 | 141 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2 |
142 #endif | 142 #endif |
143 #endif | 143 #endif |
144 | 144 |
| 145 // Android x86 NDK ABI requires SSE3 support |
| 146 #if defined(SK_BUILD_FOR_ANDROID) |
| 147 #undef SK_CPU_SSE_LEVEL |
| 148 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE3 |
| 149 #endif |
| 150 |
145 ////////////////////////////////////////////////////////////////////// | 151 ////////////////////////////////////////////////////////////////////// |
146 // ARM defines | 152 // ARM defines |
147 | 153 |
148 #if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR) | 154 #if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR) |
149 #define SK_CPU_ARM | 155 #define SK_CPU_ARM |
150 | 156 |
151 #if defined(__GNUC__) | 157 #if defined(__GNUC__) |
152 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ | 158 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ |
153 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ | 159 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ |
154 || defined(__ARM_ARCH_7EM__) || defined(_ARM_ARCH_7) | 160 || defined(__ARM_ARCH_7EM__) || defined(_ARM_ARCH_7) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 * | 240 * |
235 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute. | 241 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute. |
236 */ | 242 */ |
237 #if SK_HAS_ATTRIBUTE(optimize) | 243 #if SK_HAS_ATTRIBUTE(optimize) |
238 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1"))) | 244 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1"))) |
239 #else | 245 #else |
240 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */ | 246 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */ |
241 #endif | 247 #endif |
242 | 248 |
243 #endif | 249 #endif |
OLD | NEW |