mirror of
https://abf.rosa.ru/djam/chromium-browser-stable.git
synced 2025-02-24 15:12:49 +00:00
297 lines
10 KiB
Diff
297 lines
10 KiB
Diff
diff -up chromium-55.0.2883.11/third_party/pdfium/BUILD.gn.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/BUILD.gn
|
|
--- chromium-55.0.2883.11/third_party/pdfium/BUILD.gn.pdfium-system-libtiff-libpng 2016-10-14 00:04:44.000000000 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/BUILD.gn 2016-10-15 12:25:53.045704800 +0200
|
|
@@ -19,7 +19,6 @@
|
|
ldflags = []
|
|
include_dirs = [ "." ]
|
|
defines = [
|
|
- "OPJ_STATIC",
|
|
"PNG_PREFIX",
|
|
"PNG_USE_READ_MACROS",
|
|
]
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/codec_int.h.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/codec_int.h
|
|
--- chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/codec_int.h.pdfium-system-libtiff-libpng 2016-10-15 12:25:53.046704787 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/codec_int.h 2016-10-15 12:31:21.588574456 +0200
|
|
@@ -16,7 +16,7 @@
|
|
|
|
#include "core/fxcodec/fx_codec.h"
|
|
#include "core/fxcodec/jbig2/JBig2_Context.h"
|
|
-#include "third_party/libopenjpeg20/openjpeg.h"
|
|
+#include <openjpeg.h>
|
|
|
|
class CPDF_ColorSpace;
|
|
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_flate.cpp.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_flate.cpp
|
|
--- chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_flate.cpp.pdfium-system-libtiff-libpng 2016-10-15 12:25:53.046704787 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_flate.cpp 2016-10-15 12:31:34.987406010 +0200
|
|
@@ -15,7 +15,7 @@
|
|
#include "core/fxcrt/fx_ext.h"
|
|
#include "third_party/base/numerics/safe_conversions.h"
|
|
#include "third_party/base/ptr_util.h"
|
|
-#include "third_party/zlib/zlib.h"
|
|
+#include <zlib.h>
|
|
|
|
extern "C" {
|
|
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_jpx_opj.cpp.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_jpx_opj.cpp
|
|
--- chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_jpx_opj.cpp.pdfium-system-libtiff-libpng 2016-10-14 00:04:44.000000000 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_jpx_opj.cpp 2016-10-15 12:31:50.153215350 +0200
|
|
@@ -17,7 +17,7 @@
|
|
#include "core/fxcrt/fx_safe_types.h"
|
|
#include "third_party/base/ptr_util.h"
|
|
#include "third_party/lcms2-2.6/include/lcms2.h"
|
|
-#include "third_party/libopenjpeg20/openjpeg.h"
|
|
+#include <openjpeg.h>
|
|
|
|
static void fx_error_callback(const char* msg, void* client_data) {
|
|
(void)client_data;
|
|
@@ -728,7 +728,7 @@
|
|
image = nullptr;
|
|
return false;
|
|
}
|
|
- image->pdfium_use_colorspace = !!m_ColorSpace;
|
|
+// image->pdfium_use_colorspace = !!m_ColorSpace;
|
|
|
|
if (!parameters.nb_tile_to_decode) {
|
|
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0, parameters.DA_y0,
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_png.cpp.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_png.cpp
|
|
--- chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/ccodec_pngmodule.cpp.pdfium-system-libtiff-libpng 2016-10-15 12:25:53.047704775 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/ccodec_pngmodule.cpp 2016-10-15 12:32:27.308748242 +0200
|
|
@@ -10,10 +10,7 @@
|
|
#include "core/fxcodec/fx_codec.h"
|
|
#include "core/fxge/fx_dib.h"
|
|
|
|
-extern "C" {
|
|
-#undef FAR
|
|
-#include "third_party/libpng16/png.h"
|
|
-}
|
|
+#include <png.h>
|
|
|
|
static void _png_error_data(png_structp png_ptr, png_const_charp error_msg) {
|
|
if (png_get_error_ptr(png_ptr)) {
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_tiff.cpp.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/fx_codec_tiff.cpp
|
|
--- chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/ccodec_tiffmodule.cpp.pdfium-system-libtiff-libpng 2016-10-14 00:04:44.000000000 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/core/fxcodec/codec/ccodec_tiffmodule.cpp 2016-10-15 12:32:46.897501978 +0200
|
|
@@ -9,7 +9,7 @@
|
|
#include "third_party/base/ptr_util.h"
|
|
|
|
extern "C" {
|
|
-#include "third_party/libtiff/tiffiop.h"
|
|
+#include <tiffio.h>
|
|
}
|
|
|
|
class CCodec_TiffContext {
|
|
@@ -143,7 +143,7 @@ TIFF* tiff_open(void* context, const cha
|
|
tiff_write, tiff_seek, tiff_close, tiff_get_size,
|
|
tiff_map, tiff_unmap);
|
|
if (tif) {
|
|
- tif->tif_fd = (int)(intptr_t)context;
|
|
+ (void)TIFFSetFileno(tif, (int)(intptr_t)context);
|
|
}
|
|
return tif;
|
|
}
|
|
diff -up chromium-55.0.2883.11/third_party/pdfium/third_party/BUILD.gn.pdfium-system-libtiff-libpng chromium-55.0.2883.11/third_party/pdfium/third_party/BUILD.gn
|
|
--- chromium-55.0.2883.11/third_party/pdfium/third_party/BUILD.gn.pdfium-system-libtiff-libpng 2016-10-14 00:04:44.000000000 +0200
|
|
+++ chromium-55.0.2883.11/third_party/pdfium/third_party/BUILD.gn 2016-10-15 12:25:53.048704762 +0200
|
|
@@ -5,6 +5,7 @@
|
|
import("//build/config/arm.gni")
|
|
import("//build_overrides/build.gni")
|
|
import("../pdfium.gni")
|
|
+import("//build/config/linux/pkg_config.gni")
|
|
|
|
group("third_party") {
|
|
deps = [
|
|
@@ -318,164 +319,33 @@
|
|
}
|
|
}
|
|
|
|
-config("fx_libopenjpeg_warnings") {
|
|
- visibility = [ ":*" ]
|
|
- if (is_win) {
|
|
- cflags = [
|
|
- # Signed/unsigned comparisons.
|
|
- "/wd4018",
|
|
- ]
|
|
- }
|
|
-}
|
|
-
|
|
-static_library("fx_libopenjpeg") {
|
|
- configs -= [ "//build/config/compiler:chromium_code" ]
|
|
- configs += [
|
|
- "//build/config/compiler:no_chromium_code",
|
|
- ":pdfium_third_party_config",
|
|
-
|
|
- # Must be after no_chromium_code for warning flags to be ordered correctly.
|
|
- ":fx_libopenjpeg_warnings",
|
|
- ]
|
|
- sources = [
|
|
- "libopenjpeg20/bio.c",
|
|
- "libopenjpeg20/cio.c",
|
|
- "libopenjpeg20/dwt.c",
|
|
- "libopenjpeg20/event.c",
|
|
- "libopenjpeg20/function_list.c",
|
|
- "libopenjpeg20/image.c",
|
|
- "libopenjpeg20/invert.c",
|
|
- "libopenjpeg20/j2k.c",
|
|
- "libopenjpeg20/jp2.c",
|
|
- "libopenjpeg20/mct.c",
|
|
- "libopenjpeg20/mqc.c",
|
|
- "libopenjpeg20/openjpeg.c",
|
|
- "libopenjpeg20/opj_clock.c",
|
|
- "libopenjpeg20/pi.c",
|
|
- "libopenjpeg20/raw.c",
|
|
- "libopenjpeg20/t1.c",
|
|
- "libopenjpeg20/t2.c",
|
|
- "libopenjpeg20/tcd.c",
|
|
- "libopenjpeg20/tgt.c",
|
|
+pkg_config("openjpeg_config") {
|
|
+ packages = [
|
|
+ "libopenjp2",
|
|
]
|
|
}
|
|
|
|
-static_library("fx_lpng") {
|
|
- configs -= [ "//build/config/compiler:chromium_code" ]
|
|
- configs += [
|
|
- "//build/config/compiler:no_chromium_code",
|
|
- ":pdfium_third_party_config",
|
|
- ]
|
|
- sources = [
|
|
- "libpng16/png.c",
|
|
- "libpng16/png.h",
|
|
- "libpng16/pngconf.h",
|
|
- "libpng16/pngdebug.h",
|
|
- "libpng16/pngerror.c",
|
|
- "libpng16/pngget.c",
|
|
- "libpng16/pnginfo.h",
|
|
- "libpng16/pnglibconf.h",
|
|
- "libpng16/pngmem.c",
|
|
- "libpng16/pngpread.c",
|
|
- "libpng16/pngprefix.h",
|
|
- "libpng16/pngpriv.h",
|
|
- "libpng16/pngread.c",
|
|
- "libpng16/pngrio.c",
|
|
- "libpng16/pngrtran.c",
|
|
- "libpng16/pngrutil.c",
|
|
- "libpng16/pngset.c",
|
|
- "libpng16/pngstruct.h",
|
|
- "libpng16/pngtrans.c",
|
|
- "libpng16/pngwio.c",
|
|
- "libpng16/pngwrite.c",
|
|
- "libpng16/pngwtran.c",
|
|
- "libpng16/pngwutil.c",
|
|
- ]
|
|
+source_set("fx_libopenjpeg") {
|
|
+ public_configs = [ ":openjpeg_config" ]
|
|
+}
|
|
|
|
- defines = []
|
|
- cflags = []
|
|
- deps = [
|
|
- "//third_party/zlib",
|
|
+pkg_config("fx_libpng_config") {
|
|
+ packages = [
|
|
+ "libpng",
|
|
]
|
|
+}
|
|
+
|
|
+source_set("fx_lpng") {
|
|
+ public_configs = [ ":fx_libpng_config" ]
|
|
+}
|
|
|
|
- if (current_cpu == "x86" || current_cpu == "x64") {
|
|
- sources += [
|
|
- "libpng16/contrib/intel/filter_sse2_intrinsics.c",
|
|
- "libpng16/contrib/intel/intel_init.c",
|
|
- ]
|
|
- defines += [ "PNG_INTEL_SSE_OPT=1" ]
|
|
- } else if ((current_cpu == "arm" || current_cpu == "arm64") && arm_use_neon) {
|
|
- sources += [
|
|
- "libpng16/arm/arm_init.c",
|
|
- "libpng16/arm/filter_neon_intrinsics.c",
|
|
- ]
|
|
- defines += [
|
|
- "PNG_ARM_NEON_OPT=2",
|
|
- "PNG_ARM_NEON_IMPLEMENTATION=1",
|
|
- ]
|
|
- }
|
|
-
|
|
- if (is_win) {
|
|
- # Unary minus applied to unsigned type.
|
|
- cflags += [ "/wd4146" ]
|
|
- }
|
|
+config("fx_tiff_config") {
|
|
+ libs = [ "tiff" ]
|
|
}
|
|
|
|
if (pdf_enable_xfa) {
|
|
- static_library("fx_tiff") {
|
|
- configs -= [ "//build/config/compiler:chromium_code" ]
|
|
- configs += [
|
|
- "//build/config/compiler:no_chromium_code",
|
|
- ":pdfium_third_party_config",
|
|
- ]
|
|
- if (is_win) {
|
|
- # Need to undefine the macro since it is redefined in
|
|
- # tif_ojpeg.c and tif_jpeg.c.
|
|
- configs -= [ "//build/config/win:lean_and_mean" ]
|
|
- }
|
|
- deps = [
|
|
- "//third_party:jpeg",
|
|
- "//third_party/zlib",
|
|
- ]
|
|
- sources = [
|
|
- "libtiff/tif_aux.c",
|
|
- "libtiff/tif_close.c",
|
|
- "libtiff/tif_codec.c",
|
|
- "libtiff/tif_color.c",
|
|
- "libtiff/tif_compress.c",
|
|
- "libtiff/tif_dir.c",
|
|
- "libtiff/tif_dirinfo.c",
|
|
- "libtiff/tif_dirread.c",
|
|
- "libtiff/tif_dirwrite.c",
|
|
- "libtiff/tif_dumpmode.c",
|
|
- "libtiff/tif_error.c",
|
|
- "libtiff/tif_extension.c",
|
|
- "libtiff/tif_fax3.c",
|
|
- "libtiff/tif_fax3sm.c",
|
|
- "libtiff/tif_flush.c",
|
|
- "libtiff/tif_getimage.c",
|
|
- "libtiff/tif_jpeg.c",
|
|
- "libtiff/tif_luv.c",
|
|
- "libtiff/tif_lzw.c",
|
|
- "libtiff/tif_next.c",
|
|
- "libtiff/tif_ojpeg.c",
|
|
- "libtiff/tif_open.c",
|
|
- "libtiff/tif_packbits.c",
|
|
- "libtiff/tif_pixarlog.c",
|
|
- "libtiff/tif_predict.c",
|
|
- "libtiff/tif_print.c",
|
|
- "libtiff/tif_read.c",
|
|
- "libtiff/tif_strip.c",
|
|
- "libtiff/tif_swab.c",
|
|
- "libtiff/tif_thunder.c",
|
|
- "libtiff/tif_tile.c",
|
|
- "libtiff/tif_version.c",
|
|
- "libtiff/tif_warning.c",
|
|
- "libtiff/tif_write.c",
|
|
- "libtiff/tif_zip.c",
|
|
- "libtiff/tiffiop.h",
|
|
- "libtiff/tiffvers.h",
|
|
- ]
|
|
+ source_set("fx_tiff") {
|
|
+ public_configs = [ ":fx_tiff_config" ]
|
|
}
|
|
}
|
|
|
|
--- chromium-59.0.3071.86/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h.system-openjpg 2017-06-05 21:04:21.000000000 +0200
|
|
+++ chromium-59.0.3071.86/third_party/pdfium/core/fxcodec/codec/cjpx_decoder.h 2017-06-08 02:14:04.774234999 +0200
|
|
@@ -9,7 +9,7 @@
|
|
|
|
#include <vector>
|
|
|
|
-#include "third_party/libopenjpeg20/openjpeg.h"
|
|
+#include <openjpeg.h>
|
|
|
|
class CPDF_ColorSpace;
|
|
|