Chromium Code Reviews| Index: gyp/libpng.gyp |
| diff --git a/gyp/libpng.gyp b/gyp/libpng.gyp |
| index dc58459eaf0931b0929d2467ee2ac9daea28a813..2cac52fc8959e25793c815f0be8819988a6a1e2f 100644 |
| --- a/gyp/libpng.gyp |
| +++ b/gyp/libpng.gyp |
| @@ -65,40 +65,46 @@ |
| '../third_party/externals/libpng/pngwutil.c', |
| ], |
| 'conditions': [ |
| - [ 'skia_os == "ios"', { |
| - # explicitly disable looking for NEON on iOS builds |
| + [ '"x86" in skia_arch_type', { |
| 'defines': [ |
| - 'PNG_ARM_NEON_OPT=0', |
| + 'PNG_INTEL_SSE_OPT=1', |
| ], |
| - }, { # skia_os != "ios" |
| - 'dependencies': [ |
| - 'libpng.gyp:libpng_static_neon', |
| + 'sources': [ |
| + '../third_party/externals/libpng/contrib/intel/intel_init.c', |
| + '../third_party/externals/libpng/contrib/intel/filter_sse2_intrinsics.c', |
| ], |
| }], |
| - ], |
| - }, |
| - { |
| - 'target_name': 'libpng_static_neon', |
| - 'type': 'static_library', |
| - 'include_dirs': [ |
| - # Needed for generated pnglibconf.h and pngprefix.h |
| - '../third_party/libpng', |
| - '../third_party/externals/libpng', |
| - ], |
| - 'dependencies': [ |
| - 'zlib.gyp:zlib', |
| - ], |
| - 'sources': [ |
| - '../third_party/externals/libpng/arm/arm_init.c', |
| - '../third_party/externals/libpng/arm/filter_neon.S', |
| - '../third_party/externals/libpng/arm/filter_neon_intrinsics.c', |
| - ], |
| - 'conditions': [ |
| - ['arm_neon_optional', { |
| + [ '(("arm64" == skia_arch_type) or \ |
| + ("arm" == skia_arch_type and arm_neon == 1)) and \ |
| + ("ios" != skia_os)', { |
| + 'defines': [ |
| + 'PNG_ARM_NEON_OPT=2', |
| + 'PNG_ARM_NEON_IMPLEMENTATION=1', |
| + ], |
| + 'sources': [ |
| + '../third_party/externals/libpng/arm/arm_init.c', |
| + '../third_party/externals/libpng/arm/filter_neon_intrinsics.c', |
| + ], |
| + }], |
| + [ '"arm" == skia_arch_type and arm_neon_optional == 1', { |
|
mtklein
2016/02/19 17:28:30
Let's take the opportunity to drop this. We're pr
msarett
2016/02/19 18:36:18
Done.
|
| + 'defines': [ |
| + 'PNG_ARM_NEON_API_SUPPORTED', |
| + 'PNG_ARM_NEON_CHECK_SUPPORTED', |
| + 'PNG_ARM_NEON_IMPLEMENTATION=1', |
| + ], |
| + 'sources': [ |
| + '../third_party/externals/libpng/arm/arm_init.c', |
| + '../third_party/externals/libpng/arm/filter_neon_intrinsics.c', |
| + ], |
| 'cflags': [ |
| '-mfpu=neon', |
| ], |
| }], |
| + [ '"ios" == skia_os', { |
| + 'defines': [ |
| + 'PNG_ARM_NEON_OPT=0', |
| + ], |
| + }], |
| ], |
| } |
| ] |