| OLD | NEW |
| 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 |
| OLD | NEW |