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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 #endif | 137 #endif |
138 | 138 |
139 // 64bit intel guarantees at least SSE2 | 139 // 64bit intel guarantees at least SSE2 |
140 #if defined(__x86_64__) || defined(_WIN64) | 140 #if defined(__x86_64__) || defined(_WIN64) |
141 #if !defined(SK_CPU_SSE_LEVEL) || (SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSE2) | 141 #if !defined(SK_CPU_SSE_LEVEL) || (SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSE2) |
142 #undef SK_CPU_SSE_LEVEL | 142 #undef SK_CPU_SSE_LEVEL |
143 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2 | 143 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2 |
144 #endif | 144 #endif |
145 #endif | 145 #endif |
146 | 146 |
| 147 // Android x86 NDK ABI requires SSE3 support |
| 148 #if defined(SK_BUILD_FOR_ANDROID) |
| 149 #undef SK_CPU_SSE_LEVEL |
| 150 #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE3 |
| 151 #endif |
| 152 |
147 ////////////////////////////////////////////////////////////////////// | 153 ////////////////////////////////////////////////////////////////////// |
148 // ARM defines | 154 // ARM defines |
149 | 155 |
150 #if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR) | 156 #if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR) |
151 #define SK_CPU_ARM | 157 #define SK_CPU_ARM |
152 | 158 |
153 #if defined(__GNUC__) | 159 #if defined(__GNUC__) |
154 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ | 160 #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ |
155 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ | 161 || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ |
156 || defined(__ARM_ARCH_7EM__) || defined(_ARM_ARCH_7) | 162 || defined(__ARM_ARCH_7EM__) || defined(_ARM_ARCH_7) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 * | 242 * |
237 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute. | 243 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute. |
238 */ | 244 */ |
239 #if SK_HAS_ATTRIBUTE(optimize) | 245 #if SK_HAS_ATTRIBUTE(optimize) |
240 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1"))) | 246 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1"))) |
241 #else | 247 #else |
242 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */ | 248 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */ |
243 #endif | 249 #endif |
244 | 250 |
245 #endif | 251 #endif |
OLD | NEW |