XFA: Rename libpng to libpng16.

Otherwise this conflicts with Chromium's copy if the include paths just
happens to be in the wrong order. Since the two copies of libpng are of
different versions, we cannot use Chromium's copy.

TBR=tsepez@chromium.org,ochang@chromium.org

Review URL: https://codereview.chromium.org/1599513004 .
diff --git a/core/src/fxcodec/codec/DEPS b/core/src/fxcodec/codec/DEPS
index bfbbd82..495d288 100644
--- a/core/src/fxcodec/codec/DEPS
+++ b/core/src/fxcodec/codec/DEPS
@@ -1,4 +1,4 @@
 include_rules = [
-  '+third_party/libpng/png.h',
+  '+third_party/libpng16/png.h',
   '+third_party/libtiff/tiffiop.h',
 ]
diff --git a/core/src/fxcodec/codec/fx_codec_png.cpp b/core/src/fxcodec/codec/fx_codec_png.cpp
index 97c2f77..9e08473 100644
--- a/core/src/fxcodec/codec/fx_codec_png.cpp
+++ b/core/src/fxcodec/codec/fx_codec_png.cpp
@@ -12,7 +12,7 @@
 

 extern "C" {

 #undef FAR

-#include "third_party/libpng/png.h"

+#include "third_party/libpng16/png.h"

 }

 

 static void _png_error_data(png_structp png_ptr, png_const_charp error_msg) {

diff --git a/samples/image_diff_png.cc b/samples/image_diff_png.cc
index 01df836..5f0228c 100644
--- a/samples/image_diff_png.cc
+++ b/samples/image_diff_png.cc
@@ -17,7 +17,7 @@
 #include <string>
 
 #include "third_party/base/logging.h"
-#include "third_party/libpng/png.h"
+#include "third_party/libpng16/png.h"
 #include "third_party/zlib_v128/zlib.h"
 
 namespace image_diff_png {
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index d8d1dd2..2468dd4 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -278,28 +278,28 @@
     "//third_party/pdfium:pdfium_config",
   ]
   sources = [
-    "libpng/png.c",
-    "libpng/png.h",
-    "libpng/pngconf.h",
-    "libpng/pngdebug.h",
-    "libpng/pngerror.c",
-    "libpng/pngget.c",
-    "libpng/pnginfo.h",
-    "libpng/pnglibconf.h",
-    "libpng/pngmem.c",
-    "libpng/pngpread.c",
-    "libpng/pngpriv.h",
-    "libpng/pngread.c",
-    "libpng/pngrio.c",
-    "libpng/pngrtran.c",
-    "libpng/pngrutil.c",
-    "libpng/pngset.c",
-    "libpng/pngstruct.h",
-    "libpng/pngtrans.c",
-    "libpng/pngwio.c",
-    "libpng/pngwrite.c",
-    "libpng/pngwtran.c",
-    "libpng/pngwutil.c",
+    "libpng16/png.c",
+    "libpng16/png.h",
+    "libpng16/pngconf.h",
+    "libpng16/pngdebug.h",
+    "libpng16/pngerror.c",
+    "libpng16/pngget.c",
+    "libpng16/pnginfo.h",
+    "libpng16/pnglibconf.h",
+    "libpng16/pngmem.c",
+    "libpng16/pngpread.c",
+    "libpng16/pngpriv.h",
+    "libpng16/pngread.c",
+    "libpng16/pngrio.c",
+    "libpng16/pngrtran.c",
+    "libpng16/pngrutil.c",
+    "libpng16/pngset.c",
+    "libpng16/pngstruct.h",
+    "libpng16/pngtrans.c",
+    "libpng16/pngwio.c",
+    "libpng16/pngwrite.c",
+    "libpng16/pngwtran.c",
+    "libpng16/pngwutil.c",
   ]
 }
 
diff --git a/third_party/libpng/0000-build-config.patch b/third_party/libpng16/0000-build-config.patch
similarity index 74%
rename from third_party/libpng/0000-build-config.patch
rename to third_party/libpng16/0000-build-config.patch
index 4f00139..7b7b158 100644
--- a/third_party/libpng/0000-build-config.patch
+++ b/third_party/libpng16/0000-build-config.patch
@@ -1,6 +1,6 @@
-diff a/third_party/libpng/pngmem.c b/third_party/libpng/pngmem.c
---- a/third_party/libpng/pngmem.c
-+++ b/third_party/libpng/pngmem.c
+diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c
+--- a/third_party/libpng16/pngmem.c
++++ b/third_party/libpng16/pngmem.c
 @@ -19,6 +19,9 @@
  
  #include "pngpriv.h"
@@ -29,9 +29,9 @@
  }
  
  #ifdef PNG_USER_MEM_SUPPORTED
-diff a/third_party/libpng/pngstruct.h b/third_party/libpng/pngstruct.h
---- a/third_party/libpng/pngstruct.h
-+++ b/third_party/libpng/pngstruct.h
+diff a/third_party/libpng16/pngstruct.h b/third_party/libpng16/pngstruct.h
+--- a/third_party/libpng16/pngstruct.h
++++ b/third_party/libpng16/pngstruct.h
 @@ -27,7 +27,7 @@
     /* We must ensure that zlib uses 'const' in declarations. */
  #  define ZLIB_CONST
diff --git a/third_party/libpng/0001-disable-arm-neon.patch b/third_party/libpng16/0001-disable-arm-neon.patch
similarity index 63%
rename from third_party/libpng/0001-disable-arm-neon.patch
rename to third_party/libpng16/0001-disable-arm-neon.patch
index b5105f7..91616bb 100644
--- a/third_party/libpng/0001-disable-arm-neon.patch
+++ b/third_party/libpng16/0001-disable-arm-neon.patch
@@ -1,6 +1,6 @@
-diff a/third_party/libpng/pngpriv.h b/third_party/libpng/pngpriv.h
---- a/third_party/libpng/pngpriv.h
-+++ b/third_party/libpng/pngpriv.h
+diff a/third_party/libpng16/pngpriv.h b/third_party/libpng16/pngpriv.h
+--- a/third_party/libpng16/pngpriv.h
++++ b/third_party/libpng16/pngpriv.h
 @@ -127,7 +127,7 @@
      */
  #  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
diff --git a/third_party/libpng/README.pdfium b/third_party/libpng16/README.pdfium
similarity index 100%
rename from third_party/libpng/README.pdfium
rename to third_party/libpng16/README.pdfium
diff --git a/third_party/libpng/png.c b/third_party/libpng16/png.c
similarity index 100%
rename from third_party/libpng/png.c
rename to third_party/libpng16/png.c
diff --git a/third_party/libpng/png.h b/third_party/libpng16/png.h
similarity index 100%
rename from third_party/libpng/png.h
rename to third_party/libpng16/png.h
diff --git a/third_party/libpng/pngconf.h b/third_party/libpng16/pngconf.h
similarity index 100%
rename from third_party/libpng/pngconf.h
rename to third_party/libpng16/pngconf.h
diff --git a/third_party/libpng/pngdebug.h b/third_party/libpng16/pngdebug.h
similarity index 100%
rename from third_party/libpng/pngdebug.h
rename to third_party/libpng16/pngdebug.h
diff --git a/third_party/libpng/pngerror.c b/third_party/libpng16/pngerror.c
similarity index 100%
rename from third_party/libpng/pngerror.c
rename to third_party/libpng16/pngerror.c
diff --git a/third_party/libpng/pngget.c b/third_party/libpng16/pngget.c
similarity index 100%
rename from third_party/libpng/pngget.c
rename to third_party/libpng16/pngget.c
diff --git a/third_party/libpng/pnginfo.h b/third_party/libpng16/pnginfo.h
similarity index 100%
rename from third_party/libpng/pnginfo.h
rename to third_party/libpng16/pnginfo.h
diff --git a/third_party/libpng/pnglibconf.h b/third_party/libpng16/pnglibconf.h
similarity index 100%
rename from third_party/libpng/pnglibconf.h
rename to third_party/libpng16/pnglibconf.h
diff --git a/third_party/libpng/pngmem.c b/third_party/libpng16/pngmem.c
similarity index 100%
rename from third_party/libpng/pngmem.c
rename to third_party/libpng16/pngmem.c
diff --git a/third_party/libpng/pngpread.c b/third_party/libpng16/pngpread.c
similarity index 100%
rename from third_party/libpng/pngpread.c
rename to third_party/libpng16/pngpread.c
diff --git a/third_party/libpng/pngpriv.h b/third_party/libpng16/pngpriv.h
similarity index 100%
rename from third_party/libpng/pngpriv.h
rename to third_party/libpng16/pngpriv.h
diff --git a/third_party/libpng/pngread.c b/third_party/libpng16/pngread.c
similarity index 100%
rename from third_party/libpng/pngread.c
rename to third_party/libpng16/pngread.c
diff --git a/third_party/libpng/pngrio.c b/third_party/libpng16/pngrio.c
similarity index 100%
rename from third_party/libpng/pngrio.c
rename to third_party/libpng16/pngrio.c
diff --git a/third_party/libpng/pngrtran.c b/third_party/libpng16/pngrtran.c
similarity index 100%
rename from third_party/libpng/pngrtran.c
rename to third_party/libpng16/pngrtran.c
diff --git a/third_party/libpng/pngrutil.c b/third_party/libpng16/pngrutil.c
similarity index 100%
rename from third_party/libpng/pngrutil.c
rename to third_party/libpng16/pngrutil.c
diff --git a/third_party/libpng/pngset.c b/third_party/libpng16/pngset.c
similarity index 100%
rename from third_party/libpng/pngset.c
rename to third_party/libpng16/pngset.c
diff --git a/third_party/libpng/pngstruct.h b/third_party/libpng16/pngstruct.h
similarity index 100%
rename from third_party/libpng/pngstruct.h
rename to third_party/libpng16/pngstruct.h
diff --git a/third_party/libpng/pngtrans.c b/third_party/libpng16/pngtrans.c
similarity index 100%
rename from third_party/libpng/pngtrans.c
rename to third_party/libpng16/pngtrans.c
diff --git a/third_party/libpng/pngwio.c b/third_party/libpng16/pngwio.c
similarity index 100%
rename from third_party/libpng/pngwio.c
rename to third_party/libpng16/pngwio.c
diff --git a/third_party/libpng/pngwrite.c b/third_party/libpng16/pngwrite.c
similarity index 100%
rename from third_party/libpng/pngwrite.c
rename to third_party/libpng16/pngwrite.c
diff --git a/third_party/libpng/pngwtran.c b/third_party/libpng16/pngwtran.c
similarity index 100%
rename from third_party/libpng/pngwtran.c
rename to third_party/libpng16/pngwtran.c
diff --git a/third_party/libpng/pngwutil.c b/third_party/libpng16/pngwutil.c
similarity index 100%
rename from third_party/libpng/pngwutil.c
rename to third_party/libpng16/pngwutil.c
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index f653760..97deacf 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -269,28 +269,28 @@
       'target_name': 'fx_lpng',
       'type': 'static_library',
       'sources': [
-        'libpng/png.c',
-        'libpng/png.h',
-        'libpng/pngconf.h',
-        'libpng/pngdebug.h',
-        'libpng/pngerror.c',
-        'libpng/pngget.c',
-        'libpng/pnginfo.h',
-        'libpng/pnglibconf.h',
-        'libpng/pngmem.c',
-        'libpng/pngpread.c',
-        'libpng/pngpriv.h',
-        'libpng/pngread.c',
-        'libpng/pngrio.c',
-        'libpng/pngrtran.c',
-        'libpng/pngrutil.c',
-        'libpng/pngset.c',
-        'libpng/pngstruct.h',
-        'libpng/pngtrans.c',
-        'libpng/pngwio.c',
-        'libpng/pngwrite.c',
-        'libpng/pngwtran.c',
-        'libpng/pngwutil.c',
+        'libpng16/png.c',
+        'libpng16/png.h',
+        'libpng16/pngconf.h',
+        'libpng16/pngdebug.h',
+        'libpng16/pngerror.c',
+        'libpng16/pngget.c',
+        'libpng16/pnginfo.h',
+        'libpng16/pnglibconf.h',
+        'libpng16/pngmem.c',
+        'libpng16/pngpread.c',
+        'libpng16/pngpriv.h',
+        'libpng16/pngread.c',
+        'libpng16/pngrio.c',
+        'libpng16/pngrtran.c',
+        'libpng16/pngrutil.c',
+        'libpng16/pngset.c',
+        'libpng16/pngstruct.h',
+        'libpng16/pngtrans.c',
+        'libpng16/pngwio.c',
+        'libpng16/pngwrite.c',
+        'libpng16/pngwtran.c',
+        'libpng16/pngwutil.c',
       ],
     },
     {