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

Side by Side Diff: third_party/libpng16/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/libpng/pngwutil.c ('k') | third_party/libpng16/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
1 diff a/third_party/libpng/pngmem.c b/third_party/libpng/pngmem.c 1 diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c
2 --- a/third_party/libpng/pngmem.c 2 --- a/third_party/libpng16/pngmem.c
3 +++ b/third_party/libpng/pngmem.c 3 +++ b/third_party/libpng16/pngmem.c
4 @@ -19,6 +19,9 @@ 4 @@ -19,6 +19,9 @@
5 5
6 #include "pngpriv.h" 6 #include "pngpriv.h"
7 7
8 +void* FXMEM_DefaultAlloc(int byte_size, int); 8 +void* FXMEM_DefaultAlloc(int byte_size, int);
9 +void FXMEM_DefaultFree(void* pointer, int); 9 +void FXMEM_DefaultFree(void* pointer, int);
10 + 10 +
11 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) 11 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
12 /* Free a png_struct */ 12 /* Free a png_struct */
13 void /* PRIVATE */ 13 void /* PRIVATE */
14 @@ -92,7 +95,7 @@ 14 @@ -92,7 +95,7 @@
15 15
16 else 16 else
17 #endif 17 #endif
18 - return malloc((size_t)size); /* checked for truncation above */ 18 - return malloc((size_t)size); /* checked for truncation above */
19 + return FXMEM_DefaultAlloc((int)size, 0); 19 + return FXMEM_DefaultAlloc((int)size, 0);
20 } 20 }
21 21
22 else 22 else
23 @@ -249,7 +252,7 @@ 23 @@ -249,7 +252,7 @@
24 return; 24 return;
25 #endif /* USER_MEM */ 25 #endif /* USER_MEM */
26 26
27 - free(ptr); 27 - free(ptr);
28 + FXMEM_DefaultFree(ptr, 0); 28 + FXMEM_DefaultFree(ptr, 0);
29 } 29 }
30 30
31 #ifdef PNG_USER_MEM_SUPPORTED 31 #ifdef PNG_USER_MEM_SUPPORTED
32 diff a/third_party/libpng/pngstruct.h b/third_party/libpng/pngstruct.h 32 diff a/third_party/libpng16/pngstruct.h b/third_party/libpng16/pngstruct.h
33 --- a/third_party/libpng/pngstruct.h 33 --- a/third_party/libpng16/pngstruct.h
34 +++ b/third_party/libpng/pngstruct.h 34 +++ b/third_party/libpng16/pngstruct.h
35 @@ -27,7 +27,7 @@ 35 @@ -27,7 +27,7 @@
36 /* We must ensure that zlib uses 'const' in declarations. */ 36 /* We must ensure that zlib uses 'const' in declarations. */
37 # define ZLIB_CONST 37 # define ZLIB_CONST
38 #endif 38 #endif
39 -#include "zlib.h" 39 -#include "zlib.h"
40 +#include "third_party/zlib_v128/zlib.h" 40 +#include "third_party/zlib_v128/zlib.h"
41 #ifdef const 41 #ifdef const
42 /* zlib.h sometimes #defines const to nothing, undo this. */ 42 /* zlib.h sometimes #defines const to nothing, undo this. */
43 # undef const 43 # undef const
OLDNEW
« no previous file with comments | « third_party/libpng/pngwutil.c ('k') | third_party/libpng16/0001-disable-arm-neon.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698