OLD | NEW |
1 # Gyp file for opts projects | 1 # Gyp file for opts projects |
2 { | 2 { |
3 'targets': [ | 3 'targets': [ |
4 # Due to an unfortunate intersection of lameness between gcc and gyp, | 4 # Due to an unfortunate intersection of lameness between gcc and gyp, |
5 # we have to build the *_SSE2.cpp files in a separate target. The | 5 # we have to build the *_SSE2.cpp files in a separate target. The |
6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
7 # must be passed the -msse2 flag. However, with this flag, it may | 7 # must be passed the -msse2 flag. However, with this flag, it may |
8 # emit SSE2 instructions even for scalar code, such as the CPUID | 8 # emit SSE2 instructions even for scalar code, such as the CPUID |
9 # test used to test for the presence of SSE2. So that, and all other | 9 # test used to test for the presence of SSE2. So that, and all other |
10 # code must be compiled *without* -msse2. The gyp lameness is that it | 10 # code must be compiled *without* -msse2. The gyp lameness is that it |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 'type': 'static_library', | 181 'type': 'static_library', |
182 'standalone_static_library': 1, | 182 'standalone_static_library': 1, |
183 'dependencies': [ | 183 'dependencies': [ |
184 'core.gyp:*', | 184 'core.gyp:*', |
185 'effects.gyp:*' | 185 'effects.gyp:*' |
186 ], | 186 ], |
187 'include_dirs': [ | 187 'include_dirs': [ |
188 '../src/core', | 188 '../src/core', |
189 '../src/utils', | 189 '../src/utils', |
190 ], | 190 ], |
| 191 'sources': [ |
| 192 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', |
| 193 ], |
191 'conditions': [ | 194 'conditions': [ |
| 195 [ 'skia_os == "win"', { |
| 196 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ], |
| 197 }], |
| 198 # (Mac has -mssse3 globally.) |
192 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 199 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
193 and not skia_android_framework', { | 200 and not skia_android_framework', { |
194 'cflags': [ | 201 'cflags': [ |
195 '-mssse3', | 202 '-mssse3', |
196 ], | 203 ], |
197 }], | 204 }], |
198 # (Mac has -mssse3 globally.) | |
199 [ 'skia_arch_type == "x86"', { | |
200 'sources': [ | |
201 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', | |
202 ], | |
203 }], | |
204 ], | 205 ], |
205 }, | 206 }, |
206 # For the same lame reasons as what is done for skia_opts, we also have to | 207 # For the same lame reasons as what is done for skia_opts, we also have to |
207 # create another target specifically for SSE4 code as we would not want | 208 # create another target specifically for SSE4 code as we would not want |
208 # to compile the SSE2 code with -msse4 which would potentially allow | 209 # to compile the SSE2 code with -msse4 which would potentially allow |
209 # gcc to generate SSE4 code. | 210 # gcc to generate SSE4 code. |
210 { | 211 { |
211 'target_name': 'opts_sse4', | 212 'target_name': 'opts_sse4', |
212 'product_name': 'skia_opts_sse4', | 213 'product_name': 'skia_opts_sse4', |
213 'type': 'static_library', | 214 'type': 'static_library', |
214 'standalone_static_library': 1, | 215 'standalone_static_library': 1, |
215 'dependencies': [ | 216 'dependencies': [ |
216 'core.gyp:*', | 217 'core.gyp:*', |
217 'effects.gyp:*' | 218 'effects.gyp:*' |
218 ], | 219 ], |
219 'include_dirs': [ | 220 'include_dirs': [ |
220 '../src/core', | 221 '../src/core', |
221 '../src/utils', | 222 '../src/utils', |
222 ], | 223 ], |
| 224 'sources': [ |
| 225 '../src/opts/SkBlurImage_opts_SSE4.cpp', |
| 226 ], |
223 'conditions': [ | 227 'conditions': [ |
| 228 [ 'skia_arch_width == 64', { |
| 229 'sources': [ |
| 230 '../src/opts/SkBlitRow_opts_SSE4_x64_asm.S', |
| 231 ], |
| 232 }], |
| 233 [ 'skia_arch_width == 32', { |
| 234 'sources': [ |
| 235 '../src/opts/SkBlitRow_opts_SSE4_asm.S', |
| 236 ], |
| 237 }], |
| 238 [ 'skia_os == "win"', { |
| 239 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], |
| 240 }], |
224 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 241 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
225 and not skia_android_framework', { | 242 and not skia_android_framework', { |
226 'cflags': [ | 243 'cflags': [ |
227 '-msse4', | 244 '-msse4.1', |
228 ], | 245 ], |
229 }], | 246 }], |
230 [ 'skia_os == "mac"', { | 247 [ 'skia_os == "mac"', { |
231 'xcode_settings': { | 248 'xcode_settings': { |
232 'OTHER_CPLUSPLUSFLAGS!': [ | 249 'OTHER_CPLUSPLUSFLAGS!': [ |
233 '-mssse3', | 250 '-mssse3', |
234 ], | 251 ], |
235 'OTHER_CPLUSPLUSFLAGS': [ | 252 'OTHER_CPLUSPLUSFLAGS': [ |
236 '-msse4', | 253 '-msse4.1', |
237 ], | 254 ], |
238 }, | 255 }, |
239 }], | 256 }], |
240 [ 'skia_arch_type == "x86"', { | |
241 'sources': [ | |
242 '../src/opts/SkBlurImage_opts_SSE4.cpp', | |
243 ], | |
244 'conditions': [ | |
245 [ 'skia_arch_width == 64', { | |
246 'sources': [ | |
247 '../src/opts/SkBlitRow_opts_SSE4_x64_asm.S', | |
248 ], | |
249 }], | |
250 [ 'skia_arch_width == 32', { | |
251 'sources': [ | |
252 '../src/opts/SkBlitRow_opts_SSE4_asm.S', | |
253 ], | |
254 }], | |
255 ], | |
256 }], | |
257 ], | 257 ], |
258 }, | 258 }, |
259 # NEON code must be compiled with -mfpu=neon which also affects scalar | 259 # NEON code must be compiled with -mfpu=neon which also affects scalar |
260 # code. To support dynamic NEON code paths, we need to build all | 260 # code. To support dynamic NEON code paths, we need to build all |
261 # NEON-specific sources in a separate static library. The situation | 261 # NEON-specific sources in a separate static library. The situation |
262 # is very similar to the SSSE3 and SSE4 one. | 262 # is very similar to the SSSE3 and SSE4 one. |
263 { | 263 { |
264 'target_name': 'opts_neon', | 264 'target_name': 'opts_neon', |
265 'product_name': 'skia_opts_neon', | 265 'product_name': 'skia_opts_neon', |
266 'type': 'static_library', | 266 'type': 'static_library', |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 301 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
302 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 302 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
303 '../src/opts/SkBlurImage_opts_neon.cpp', | 303 '../src/opts/SkBlurImage_opts_neon.cpp', |
304 '../src/opts/SkMorphology_opts_neon.cpp', | 304 '../src/opts/SkMorphology_opts_neon.cpp', |
305 '../src/opts/SkTextureCompression_opts_neon.cpp', | 305 '../src/opts/SkTextureCompression_opts_neon.cpp', |
306 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 306 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
307 ], | 307 ], |
308 }, | 308 }, |
309 ], | 309 ], |
310 } | 310 } |
OLD | NEW |