summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn3
-rw-r--r--core/src/fxcodec/fx_lpng/lpng_v163/png.h173
-rw-r--r--pdfium.gyp3
3 files changed, 94 insertions, 85 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 2ff4938696..0d26287d7b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -19,6 +19,9 @@ config("pdfium_config") {
"_FPDFSDK_LIB",
"_NO_GDIPLUS_", # workaround text rendering issues on Windows
"OPJ_STATIC",
+ "PNG_PREFIX",
+ "PNGPREFIX_H",
+ "PNG_USE_READ_MACROS",
]
if (pdf_use_skia) {
diff --git a/core/src/fxcodec/fx_lpng/lpng_v163/png.h b/core/src/fxcodec/fx_lpng/lpng_v163/png.h
index c3fb52d11a..538b5613a9 100644
--- a/core/src/fxcodec/fx_lpng/lpng_v163/png.h
+++ b/core/src/fxcodec/fx_lpng/lpng_v163/png.h
@@ -533,91 +533,94 @@
#define png_get_y_offset_pixels FOXIT_png_get_y_offset_pixels
#define png_get_x_offset_microns FOXIT_png_get_x_offset_microns
#define png_get_y_offset_microns FOXIT_png_get_y_offset_microns
-#define png_get_signature FOXIT_png_get_signature
-#define png_get_bKGD FOXIT_png_get_bKGD
-#define png_set_bKGD FOXIT_png_set_bKGD
-#define png_get_cHRM FOXIT_png_get_cHRM
-#define png_get_cHRM_XYZ FOXIT_png_get_cHRM_XYZ
-#define png_get_cHRM_fixed FOXIT_png_get_cHRM_fixed
-#define png_get_cHRM_XYZ_fixed FOXIT_png_get_cHRM_XYZ_fixed
-#define png_set_cHRM FOXIT_png_set_cHRM
-#define png_set_cHRM_XYZ FOXIT_png_set_cHRM_XYZ
-#define png_set_cHRM_fixed FOXIT_png_set_cHRM_fixed
-#define png_set_cHRM_XYZ_fixed FOXIT_png_set_cHRM_XYZ_fixed
-#define png_get_gAMA FOXIT_png_get_gAMA
-#define png_set_gAMA FOXIT_png_set_gAMA
-#define png_set_gAMA_fixed FOXIT_png_set_gAMA_fixed
-#define png_get_hIST FOXIT_png_get_hIST
-#define png_set_hIST FOXIT_png_set_hIST
-#define png_get_IHDR FOXIT_png_get_IHDR
-#define png_set_IHDR FOXIT_png_set_IHDR
-#define png_get_oFFs FOXIT_png_get_oFFs
-#define png_set_oFFs FOXIT_png_set_oFFs
-#define png_get_pCAL FOXIT_png_get_pCAL
-#define png_set_pCAL FOXIT_png_set_pCAL
-#define png_set_pHYs FOXIT_png_set_pHYs
-#define png_get_PLTE FOXIT_png_get_PLTE
-#define png_set_PLTE FOXIT_png_set_PLTE
-#define png_get_sBIT FOXIT_png_get_sBIT
-#define png_set_sBIT FOXIT_png_set_sBIT
-#define png_get_sRGB FOXIT_png_get_sRGB
-#define png_set_sRGB FOXIT_png_set_sRGB
-#define png_set_sRGB_gAMA_and_cHRM FOXIT_png_set_sRGB_gAMA_and_cHRM
-#define png_get_iCCP FOXIT_png_get_iCCP
-#define png_set_iCCP FOXIT_png_set_iCCP
-#define png_get_sPLT FOXIT_png_get_sPLT
-#define png_set_sPLT FOXIT_png_set_sPLT
-#define png_get_text FOXIT_png_get_text
-#define png_set_text FOXIT_png_set_text
-#define png_get_tIME FOXIT_png_get_tIME
-#define png_set_tIME FOXIT_png_set_tIME
-#define png_get_tRNS FOXIT_png_get_tRNS
-#define png_set_tRNS FOXIT_png_set_tRNS
-#define png_get_sCAL FOXIT_png_get_sCAL
-#define png_get_sCAL_fixed FOXIT_png_get_sCAL_fixed
-#define png_get_sCAL_s FOXIT_png_get_sCAL_s
-#define png_set_sCAL FOXIT_png_set_sCAL
-#define png_set_sCAL_s FOXIT_png_set_sCAL_s
-#define png_set_keep_unknown_chunks FOXIT_png_set_keep_unknown_chunks
-#define png_set_unknown_chunks FOXIT_png_set_unknown_chunks
-#define png_set_unknown_chunk_location FOXIT_png_set_unknown_chunk_location
-#define png_get_unknown_chunks FOXIT_png_get_unknown_chunks
-#define png_set_invalid FOXIT_png_set_invalid
-#define png_read_png FOXIT_png_read_png
-#define png_write_png FOXIT_png_write_png
-#define png_permit_mng_features FOXIT_png_permit_mng_features
-#define png_set_strip_error_numbers FOXIT_png_set_strip_error_numbers
-#define png_set_user_limits FOXIT_png_set_user_limits
-#define png_get_user_width_max FOXIT_png_get_user_width_max
-#define png_get_user_height_max FOXIT_png_get_user_height_max
-#define png_set_chunk_cache_max FOXIT_png_set_chunk_cache_max
-#define png_get_chunk_cache_max FOXIT_png_get_chunk_cache_max
-#define png_set_chunk_malloc_max FOXIT_png_set_chunk_malloc_max
-#define png_get_chunk_malloc_max FOXIT_png_get_chunk_malloc_max
-#define png_get_pixels_per_inch FOXIT_png_get_pixels_per_inch
-#define png_get_x_pixels_per_inch FOXIT_png_get_x_pixels_per_inch
-#define png_get_y_pixels_per_inch FOXIT_png_get_y_pixels_per_inch
-#define png_get_x_offset_inches FOXIT_png_get_x_offset_inches
-#define png_get_x_offset_inches_fixed FOXIT_png_get_x_offset_inches_fixed
-#define png_get_y_offset_inches FOXIT_png_get_y_offset_inches
-#define png_get_y_offset_inches_fixed FOXIT_png_get_y_offset_inches_fixed
-#define png_get_pHYs_dpi FOXIT_png_get_pHYs_dpi
-#define png_get_io_state FOXIT_png_get_io_state
-#define png_get_io_chunk_name FOXIT_png_get_io_chunk_name
-#define png_get_io_chunk_type FOXIT_png_get_io_chunk_type
-#define png_get_uint_31 FOXIT_png_get_uint_31
-#define png_save_uint_32 FOXIT_png_save_uint_32
-#define png_save_int_32 FOXIT_png_save_int_32
-#define png_save_uint_16 FOXIT_png_save_uint_16
-#define png_image_begin_read_from_file FOXIT_png_image_begin_read_from_file
-#define png_image_begin_read_from_stdio FOXIT_png_image_begin_read_from_stdio
-#define png_image_begin_read_from_memory FOXIT_png_image_begin_read_from_memory
-#define png_image_finish_read FOXIT_png_image_finish_read
-#define png_image_free FOXIT_png_image_free
-#define png_image_write_to_file FOXIT_png_image_write_to_file
-#define png_image_write_to_stdio FOXIT_png_image_write_to_stdio
-#define png_set_check_for_invalid_index FOXIT_png_set_check_for_invalid_index
-#define png_get_palette_max FOXIT_png_get_palette_max
+#define png_get_signature FOXIT_png_get_signature
+#define png_get_bKGD FOXIT_png_get_bKGD
+#define png_set_bKGD FOXIT_png_set_bKGD
+#define png_get_cHRM FOXIT_png_get_cHRM
+#define png_get_cHRM_XYZ FOXIT_png_get_cHRM_XYZ
+#define png_get_cHRM_fixed FOXIT_png_get_cHRM_fixed
+#define png_get_cHRM_XYZ_fixed FOXIT_png_get_cHRM_XYZ_fixed
+#define png_set_cHRM FOXIT_png_set_cHRM
+#define png_set_cHRM_XYZ FOXIT_png_set_cHRM_XYZ
+#define png_set_cHRM_fixed FOXIT_png_set_cHRM_fixed
+#define png_set_cHRM_XYZ_fixed FOXIT_png_set_cHRM_XYZ_fixed
+#define png_get_gAMA FOXIT_png_get_gAMA
+#define png_set_gAMA FOXIT_png_set_gAMA
+#define png_set_gAMA_fixed FOXIT_png_set_gAMA_fixed
+#define png_get_hIST FOXIT_png_get_hIST
+#define png_set_hIST FOXIT_png_set_hIST
+#define png_get_IHDR FOXIT_png_get_IHDR
+#define png_set_IHDR FOXIT_png_set_IHDR
+#define png_get_oFFs FOXIT_png_get_oFFs
+#define png_set_oFFs FOXIT_png_set_oFFs
+#define png_get_pCAL FOXIT_png_get_pCAL
+#define png_set_pCAL FOXIT_png_set_pCAL
+#define png_set_pHYs FOXIT_png_set_pHYs
+#define png_get_PLTE FOXIT_png_get_PLTE
+#define png_set_PLTE FOXIT_png_set_PLTE
+#define png_get_sBIT FOXIT_png_get_sBIT
+#define png_set_sBIT FOXIT_png_set_sBIT
+#define png_get_sRGB FOXIT_png_get_sRGB
+#define png_set_sRGB FOXIT_png_set_sRGB
+#define png_set_sRGB_gAMA_and_cHRM FOXIT_png_set_sRGB_gAMA_and_cHRM
+#define png_get_iCCP FOXIT_png_get_iCCP
+#define png_set_iCCP FOXIT_png_set_iCCP
+#define png_get_sPLT FOXIT_png_get_sPLT
+#define png_set_sPLT FOXIT_png_set_sPLT
+#define png_get_text FOXIT_png_get_text
+#define png_set_text FOXIT_png_set_text
+#define png_get_tIME FOXIT_png_get_tIME
+#define png_set_tIME FOXIT_png_set_tIME
+#define png_get_tRNS FOXIT_png_get_tRNS
+#define png_set_tRNS FOXIT_png_set_tRNS
+#define png_get_sCAL FOXIT_png_get_sCAL
+#define png_get_sCAL_fixed FOXIT_png_get_sCAL_fixed
+#define png_get_sCAL_s FOXIT_png_get_sCAL_s
+#define png_set_sCAL FOXIT_png_set_sCAL
+#define png_set_sCAL_s FOXIT_png_set_sCAL_s
+#define png_set_keep_unknown_chunks FOXIT_png_set_keep_unknown_chunks
+#define png_set_unknown_chunks FOXIT_png_set_unknown_chunks
+#define png_set_unknown_chunk_location FOXIT_png_set_unknown_chunk_location
+#define png_get_unknown_chunks FOXIT_png_get_unknown_chunks
+#define png_set_invalid FOXIT_png_set_invalid
+#define png_read_png FOXIT_png_read_png
+#define png_write_png FOXIT_png_write_png
+#define png_permit_mng_features FOXIT_png_permit_mng_features
+#define png_set_strip_error_numbers FOXIT_png_set_strip_error_numbers
+#define png_set_user_limits FOXIT_png_set_user_limits
+#define png_get_user_width_max FOXIT_png_get_user_width_max
+#define png_get_user_height_max FOXIT_png_get_user_height_max
+#define png_set_chunk_cache_max FOXIT_png_set_chunk_cache_max
+#define png_get_chunk_cache_max FOXIT_png_get_chunk_cache_max
+#define png_set_chunk_malloc_max FOXIT_png_set_chunk_malloc_max
+#define png_get_chunk_malloc_max FOXIT_png_get_chunk_malloc_max
+#define png_get_pixels_per_inch FOXIT_png_get_pixels_per_inch
+#define png_get_x_pixels_per_inch FOXIT_png_get_x_pixels_per_inch
+#define png_get_y_pixels_per_inch FOXIT_png_get_y_pixels_per_inch
+#define png_get_x_offset_inches FOXIT_png_get_x_offset_inches
+#define png_get_x_offset_inches_fixed FOXIT_png_get_x_offset_inches_fixed
+#define png_get_y_offset_inches FOXIT_png_get_y_offset_inches
+#define png_get_y_offset_inches_fixed FOXIT_png_get_y_offset_inches_fixed
+#define png_get_pHYs_dpi FOXIT_png_get_pHYs_dpi
+#define png_get_io_state FOXIT_png_get_io_state
+#define png_get_io_chunk_name FOXIT_png_get_io_chunk_name
+#define png_get_io_chunk_type FOXIT_png_get_io_chunk_type
+#define png_get_uint_31 FOXIT_png_get_uint_31
+#define png_get_uint_32 FOXIT_png_get_uint_32
+#define png_get_uint_16 FOXIT_png_get_uint_16
+#define png_get_int_32 FOXIT_png_get_int_32
+#define png_save_uint_32 FOXIT_png_save_uint_32
+#define png_save_int_32 FOXIT_png_save_int_32
+#define png_save_uint_16 FOXIT_png_save_uint_16
+#define png_image_begin_read_from_file FOXIT_png_image_begin_read_from_file
+#define png_image_begin_read_from_stdio FOXIT_png_image_begin_read_from_stdio
+#define png_image_begin_read_from_memory FOXIT_png_image_begin_read_from_memory
+#define png_image_finish_read FOXIT_png_image_finish_read
+#define png_image_free FOXIT_png_image_free
+#define png_image_write_to_file FOXIT_png_image_write_to_file
+#define png_image_write_to_stdio FOXIT_png_image_write_to_stdio
+#define png_set_check_for_invalid_index FOXIT_png_set_check_for_invalid_index
+#define png_get_palette_max FOXIT_png_get_palette_max
#define png_set_option FOXIT_png_set_option
#define png_set_strip_16 FOXIT_png_set_strip_16
diff --git a/pdfium.gyp b/pdfium.gyp
index 426306d2d0..65caf6f4b7 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -15,6 +15,9 @@
'_FPDFSDK_LIB',
'_NO_GDIPLUS_', # workaround text rendering issues on Windows
'OPJ_STATIC',
+ 'PNG_PREFIX',
+ 'PNGPREFIX_H',
+ 'PNG_USE_READ_MACROS',
],
'include_dirs': [
'third_party/freetype/include',