GN: turn on easy libjpeg-turbo SIMD backends (ARMv7 and ARMv8)
authorMike Klein <mtklein@chromium.org>
Sun, 13 Nov 2016 13:52:07 +0000 (08:52 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Mon, 14 Nov 2016 13:50:15 +0000 (13:50 +0000)
These are so easy we might as well...

I did a quick check of relevant-looking defines:
   - GYP defined WITH_SIMD, but it looks like that's already defined (by jconfig.h?);
   - GYP defined RGBX_FILLER_0XFF, but that affects only x86/x86-64;
   - GYP defined STRICT_MEMORY_ACCESS, which does nothing;
   - GYP defined MOTION_JPEG_SUPPORTED, which does nothing (and we'd probably not care anyway).

BUG=skia:5875

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4745

Change-Id: Ib1f28d354630be472c4d9648d5ade74a452a9e24
Reviewed-on: https://skia-review.googlesource.com/4745
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

third_party/libjpeg-turbo/BUILD.gn

index c0382a719c3fe0837d552d06e431ad72f69f1c28..927df49a0e3c6d2932400398d154225363596138 100644 (file)
@@ -61,8 +61,21 @@ if (skia_use_system_libjpeg_turbo) {
       "../externals/libjpeg-turbo/jmemnobs.c",
       "../externals/libjpeg-turbo/jquant1.c",
       "../externals/libjpeg-turbo/jquant2.c",
-      "../externals/libjpeg-turbo/jsimd_none.c",
       "../externals/libjpeg-turbo/jutils.c",
     ]
+
+    if (current_cpu == "arm") {
+      sources += [
+        "../externals/libjpeg-turbo/simd/jsimd_arm.c",
+        "../externals/libjpeg-turbo/simd/jsimd_arm_neon.S",
+      ]
+    } else if (current_cpu == "arm64") {
+      sources += [
+        "../externals/libjpeg-turbo/simd/jsimd_arm64.c",
+        "../externals/libjpeg-turbo/simd/jsimd_arm64_neon.S",
+      ]
+    } else {
+      sources += [ "../externals/libjpeg-turbo/jsimd_none.c" ]
+    }
   }
 }