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

Side by Side Diff: third_party/libpng/0000-build-config.patch

Issue 1599513004: XFA: Rename libpng to libpng16. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff a/third_party/libpng/pngmem.c b/third_party/libpng/pngmem.c
2 --- a/third_party/libpng/pngmem.c
3 +++ b/third_party/libpng/pngmem.c
4 @@ -19,6 +19,9 @@
5
6 #include "pngpriv.h"
7
8 +void* FXMEM_DefaultAlloc(int byte_size, int);
9 +void FXMEM_DefaultFree(void* pointer, int);
10 +
11 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
12 /* Free a png_struct */
13 void /* PRIVATE */
14 @@ -92,7 +95,7 @@
15
16 else
17 #endif
18 - return malloc((size_t)size); /* checked for truncation above */
19 + return FXMEM_DefaultAlloc((int)size, 0);
20 }
21
22 else
23 @@ -249,7 +252,7 @@
24 return;
25 #endif /* USER_MEM */
26
27 - free(ptr);
28 + FXMEM_DefaultFree(ptr, 0);
29 }
30
31 #ifdef PNG_USER_MEM_SUPPORTED
32 diff a/third_party/libpng/pngstruct.h b/third_party/libpng/pngstruct.h
33 --- a/third_party/libpng/pngstruct.h
34 +++ b/third_party/libpng/pngstruct.h
35 @@ -27,7 +27,7 @@
36 /* We must ensure that zlib uses 'const' in declarations. */
37 # define ZLIB_CONST
38 #endif
39 -#include "zlib.h"
40 +#include "third_party/zlib_v128/zlib.h"
41 #ifdef const
42 /* zlib.h sometimes #defines const to nothing, undo this. */
43 # undef const
OLDNEW
« 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