Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: third_party/libpng/BUILD.gn

Issue 2021403002: Update libpng to 1.6.22 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rearrange pnglibconf.h Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libpng/BUILD.gn
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index 365c4558000df86c36ba7e1678bcb38fb89c2021..5c61dcac8c198721c9f155a1760ef5bef6abef89 100644
--- a/third_party/libpng/BUILD.gn
+++ b/third_party/libpng/BUILD.gn
@@ -7,15 +7,7 @@ import("//build/config/chromecast_build.gni")
config("libpng_config") {
include_dirs = [ "." ]
- defines = [
- "CHROME_PNG_WRITE_SUPPORT",
- "PNG_USER_CONFIG",
- ]
-
- if (is_android || is_chromecast) {
- #'toolsets': ['target', 'host'],
- defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype.
- }
+ defines = []
if (is_win) {
if (is_component_build) {
@@ -32,7 +24,12 @@ config("libpng_config") {
config("clang_warnings") {
if (is_clang) {
# Upstream uses self-assignment to avoid warnings.
- cflags = [ "-Wno-self-assign" ]
+ cflags = [
+ # libpng checks that the width is not greater than PNG_SIZE_MAX.
+ # On platforms where size_t is 64-bits, this comparison will always
+ # be false.
+ "-Wno-tautological-constant-out-of-range-compare",
+ ]
}
}
@@ -42,29 +39,50 @@ source_set("libpng_sources") {
"png.h",
"pngconf.h",
"pngerror.c",
- "pnggccrd.c",
"pngget.c",
+ "pnginfo.h",
+ "pnglibconf.h",
"pngmem.c",
"pngpread.c",
+ "pngprefix.h",
+ "pngpriv.h",
"pngread.c",
"pngrio.c",
"pngrtran.c",
"pngrutil.c",
"pngset.c",
+ "pngstruct.h",
"pngtrans.c",
- "pngusr.h",
- "pngvcrd.c",
"pngwio.c",
"pngwrite.c",
"pngwtran.c",
"pngwutil.c",
]
+ defines = []
+
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ sources += [
+ "contrib/intel/filter_sse2_intrinsics.c",
+ "contrib/intel/intel_init.c",
+ ]
+ defines += [ "PNG_INTEL_SSE_OPT=1" ]
+ } else if (current_cpu == "arm" || current_cpu == "arm64") {
+ sources += [
+ "arm/arm_init.c",
+ "arm/filter_neon_intrinsics.c",
+ ]
+ defines += [
+ "PNG_ARM_NEON_OPT=2",
+ "PNG_ARM_NEON_IMPLEMENTATION=1",
+ ]
+ }
+
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
if (is_win && is_component_build) {
- defines = [ "PNG_BUILD_DLL" ]
+ defines += [ "PNG_BUILD_DLL" ]
}
public_configs = [ ":libpng_config" ]
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp ('k') | third_party/libpng/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698