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

Unified Diff: third_party/libpng/0000-build-config.patch

Issue 1591483003: XFA: Upgrade libpng to 1.6.20. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « third_party/BUILD.gn ('k') | third_party/libpng/0001-disable-arm-neon.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libpng/0000-build-config.patch
diff --git a/third_party/libpng/0000-build-config.patch b/third_party/libpng/0000-build-config.patch
new file mode 100644
index 0000000000000000000000000000000000000000..4f0013970ab76936caced8950112bcbeeb3d6124
--- /dev/null
+++ b/third_party/libpng/0000-build-config.patch
@@ -0,0 +1,43 @@
+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
+@@ -19,6 +19,9 @@
+
+ #include "pngpriv.h"
+
++void* FXMEM_DefaultAlloc(int byte_size, int);
++void FXMEM_DefaultFree(void* pointer, int);
++
+ #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+ /* Free a png_struct */
+ void /* PRIVATE */
+@@ -92,7 +95,7 @@
+
+ else
+ #endif
+- return malloc((size_t)size); /* checked for truncation above */
++ return FXMEM_DefaultAlloc((int)size, 0);
+ }
+
+ else
+@@ -249,7 +252,7 @@
+ return;
+ #endif /* USER_MEM */
+
+- free(ptr);
++ FXMEM_DefaultFree(ptr, 0);
+ }
+
+ #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
+@@ -27,7 +27,7 @@
+ /* We must ensure that zlib uses 'const' in declarations. */
+ # define ZLIB_CONST
+ #endif
+-#include "zlib.h"
++#include "third_party/zlib_v128/zlib.h"
+ #ifdef const
+ /* zlib.h sometimes #defines const to nothing, undo this. */
+ # undef const
« no previous file with comments | « third_party/BUILD.gn ('k') | third_party/libpng/0001-disable-arm-neon.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698