summaryrefslogtreecommitdiff
path: root/third_party/BUILD.gn
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-08-03 16:29:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-03 16:29:18 -0700
commit6d5c56b44d1821a715f4496668373ac6d1f1d3c6 (patch)
tree8eea2b264c779be6c35ddaa33f1496dd73300167 /third_party/BUILD.gn
parent96a07863120273c8b89cba0e7d53ef29ae56d580 (diff)
downloadpdfium-6d5c56b44d1821a715f4496668373ac6d1f1d3c6.tar.xz
Update libpng to 1.6.22.
Sync up with Chromium's copy of libpng. Review-Url: https://codereview.chromium.org/2132263002
Diffstat (limited to 'third_party/BUILD.gn')
-rw-r--r--third_party/BUILD.gn26
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 03f11c1cf9..9a80d5f6b6 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build_overrides/build.gni")
import("../pdfium.gni")
group("third_party") {
@@ -338,6 +339,31 @@ static_library("fx_lpng") {
"libpng16/pngwtran.c",
"libpng16/pngwutil.c",
]
+
+ defines = []
+ cflags = []
+
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ sources += [
+ "libpng16/contrib/intel/filter_sse2_intrinsics.c",
+ "libpng16/contrib/intel/intel_init.c",
+ ]
+ defines += [ "PNG_INTEL_SSE_OPT=1" ]
+ } else if ((current_cpu == "arm" || current_cpu == "arm64") && arm_use_neon) {
+ sources += [
+ "libpng16/arm/arm_init.c",
+ "libpng16/arm/filter_neon_intrinsics.c",
+ ]
+ defines += [
+ "PNG_ARM_NEON_OPT=2",
+ "PNG_ARM_NEON_IMPLEMENTATION=1",
+ ]
+ }
+
+ if (is_win) {
+ # Unary minus applied to unsigned type.
+ cflags += [ "/wd4146" ]
+ }
}
if (pdf_enable_xfa) {