Kaydet (Commit) 6d7b8977 authored tarafından Miklos Vajna's avatar Miklos Vajna

external: update pdfium to 3064

This contains the new FPDFPath_GetFillColor / FPDFPageObj_GetType APIs I
want to use in CppunitTest_vcl_pdfexport.

Change-Id: I275ff761188c07dbbab27a1e0715ac250cd306c9
Reviewed-on: https://gerrit.libreoffice.org/36974Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 1167df7d
......@@ -183,8 +183,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633
export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
export PAGEMAKER_SHA256SUM := 3b5de037692f8e156777a75e162f6b110fa24c01749e4a66d7eb83f364e52a33
export PAGEMAKER_TARBALL := libpagemaker-0.0.3.tar.bz2
export PDFIUM_SHA256SUM := 27cbf262470eac93613079a0f2fcbbd26be50a8487c7be6607a5e15f4e7c9497
export PDFIUM_TARBALL := pdfium-3050.tar.bz2
export PDFIUM_SHA256SUM := ded806dc9e2a4005d8c0a6b7fcb232ab36221d72d9ff5b815e8244987299d883
export PDFIUM_TARBALL := pdfium-3064.tar.bz2
export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
export PNG_SHA256SUM := b6cec903e74e9fdd7b5bbcde0ab2415dd12f2f9e84d9e4d9ddd2ba26a41623b2
......
......@@ -15,12 +15,14 @@ $(eval $(call gb_Library_set_warnings_not_errors,pdfium))
$(eval $(call gb_Library_set_include,pdfium,\
-I$(WORKDIR)/UnpackedTarball/pdfium \
-I$(WORKDIR)/UnpackedTarball/pdfium/third_party \
$$(INCLUDE) \
))
$(eval $(call gb_Library_add_defs,pdfium,\
-DPDFIUM_DLLIMPLEMENTATION \
-DUSE_SYSTEM_LIBJPEG \
-DUNICODE \
))
# Don't show warnings upstream doesn't care about.
......@@ -324,24 +326,26 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
# fxcrt
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/fx_basic_array \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_bstring \
UnpackedTarball/pdfium/core/fxcrt/cfx_blockbuffer \
UnpackedTarball/pdfium/core/fxcrt/cfx_bytestring \
UnpackedTarball/pdfium/core/fxcrt/cfx_widestring \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_buffer \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_coords \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_gcc \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_memmgr \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_utf \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_util \
UnpackedTarball/pdfium/core/fxcrt/fx_basic_wstring \
UnpackedTarball/pdfium/core/fxcrt/fx_bidi \
UnpackedTarball/pdfium/core/fxcrt/fx_extension \
UnpackedTarball/pdfium/core/fxcrt/fx_ucddata \
UnpackedTarball/pdfium/core/fxcrt/fx_unicode \
UnpackedTarball/pdfium/core/fxcrt/fx_xml_composer \
UnpackedTarball/pdfium/core/fxcrt/fx_xml_parser \
UnpackedTarball/pdfium/core/fxcrt/fxcrt_posix \
UnpackedTarball/pdfium/core/fxcrt/fxcrt_stream \
UnpackedTarball/pdfium/core/fxcrt/fxcrt_windows \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attritem \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attrmap \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_element \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_parser \
))
# fxedit
......@@ -353,11 +357,18 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
# fxge
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/dib/fx_dib_composite \
UnpackedTarball/pdfium/core/fxge/dib/fx_dib_convert \
UnpackedTarball/pdfium/core/fxge/dib/fx_dib_engine \
UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapcomposer \
UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapstorer \
UnpackedTarball/pdfium/core/fxge/dib/cfx_dibextractor \
UnpackedTarball/pdfium/core/fxge/dib/cfx_dibitmap \
UnpackedTarball/pdfium/core/fxge/dib/cfx_dibsource \
UnpackedTarball/pdfium/core/fxge/dib/cfx_filtereddib \
UnpackedTarball/pdfium/core/fxge/dib/cfx_imagerenderer \
UnpackedTarball/pdfium/core/fxge/dib/cfx_imagestretcher \
UnpackedTarball/pdfium/core/fxge/dib/cfx_imagetransformer \
UnpackedTarball/pdfium/core/fxge/dib/cfx_scanlinecompositor \
UnpackedTarball/pdfium/core/fxge/dib/cstretchengine \
UnpackedTarball/pdfium/core/fxge/dib/fx_dib_main \
UnpackedTarball/pdfium/core/fxge/dib/fx_dib_transform \
UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitDingbats \
UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixed \
UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBold \
......@@ -488,6 +499,14 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
))
# pdfium_base
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \
UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator \
UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock \
UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc \
))
$(eval $(call gb_Library_use_externals,pdfium,\
jpeg \
zlib \
......@@ -504,32 +523,35 @@ $(eval $(call gb_Library_use_external,pdfium,freetype))
else
$(eval $(call gb_Library_set_include,pdfium,\
-I$(WORKDIR)/UnpackedTarball/pdfium/third_party/freetype/include/ \
-I$(WORKDIR)/UnpackedTarball/pdfium/third_party/freetype/src/include/ \
$$(INCLUDE) \
))
$(eval $(call gb_Library_add_defs,pdfium,\
-DFT2_BUILD_LIBRARY \
-DFT_CONFIG_MODULES_H='<freetype-custom-config/ftmodule.h>' \
-DFT_CONFIG_OPTIONS_H='<freetype-custom-config/ftoption.h>' \
))
# third_party/freetype
$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
UnpackedTarball/pdfium/third_party/freetype/src/base/ftbase \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftbitmap \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftglyph \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftinit \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftlcdfil \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftmm \
UnpackedTarball/pdfium/third_party/freetype/src/base/ftsystem \
UnpackedTarball/pdfium/third_party/freetype/src/cff/cff \
UnpackedTarball/pdfium/third_party/freetype/src/cid/type1cid \
UnpackedTarball/pdfium/third_party/freetype/src/psaux/psaux \
UnpackedTarball/pdfium/third_party/freetype/src/pshinter/pshinter \
UnpackedTarball/pdfium/third_party/freetype/src/psnames/psmodule \
UnpackedTarball/pdfium/third_party/freetype/src/raster/raster \
UnpackedTarball/pdfium/third_party/freetype/src/sfnt/sfnt \
UnpackedTarball/pdfium/third_party/freetype/src/smooth/smooth \
UnpackedTarball/pdfium/third_party/freetype/src/truetype/truetype \
UnpackedTarball/pdfium/third_party/freetype/src/type1/type1 \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftbase \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftbitmap \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftglyph \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftinit \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftlcdfil \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftmm \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftsystem \
UnpackedTarball/pdfium/third_party/freetype/src/src/cff/cff \
UnpackedTarball/pdfium/third_party/freetype/src/src/cid/type1cid \
UnpackedTarball/pdfium/third_party/freetype/src/src/psaux/psaux \
UnpackedTarball/pdfium/third_party/freetype/src/src/pshinter/pshinter \
UnpackedTarball/pdfium/third_party/freetype/src/src/psnames/psmodule \
UnpackedTarball/pdfium/third_party/freetype/src/src/raster/raster \
UnpackedTarball/pdfium/third_party/freetype/src/src/sfnt/sfnt \
UnpackedTarball/pdfium/third_party/freetype/src/src/smooth/smooth \
UnpackedTarball/pdfium/third_party/freetype/src/src/truetype/truetype \
UnpackedTarball/pdfium/third_party/freetype/src/src/type1/type1 \
))
endif
......
......@@ -9,4 +9,5 @@ How to update the tarball:
version=$(git for-each-ref|grep chromium/|tail -n 1|sed 's|.*/||')
git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/)
bzip2 pdfium-${version}.tar
......@@ -14,6 +14,7 @@ pdfium_patches += macos.patch.1
pdfium_patches += ubsan.patch
# Upstreamed as <https://pdfium-review.googlesource.com/4070>.
pdfium_patches += system-zlib.patch.1
pdfium_patches += freetype.patch.1
$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
......@@ -29,7 +30,11 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \
mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \
mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \
mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp \
mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \
mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \
mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \
mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \
mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp \
))
# vim: set noet sw=4 ts=4:
Upstream provides this define from the commandline, but while this define is
needed for fxge, it breaks the build for the bundled freetype. gbuild doesn't
support having different defines within the same Library, so just patch the
single translation unit that actually needs the define.
Long-term perhaps the solution is to enable freetype on all platforms inside
LO, then we don't have to build freetype as part of pdfium, so we can let
gbuild define this from the commandline.
diff --git a/core/fxge/freetype/fx_freetype.cpp b/core/fxge/freetype/fx_freetype.cpp
index 0ae207b02..879bf5ab9 100644
--- a/core/fxge/freetype/fx_freetype.cpp
+++ b/core/fxge/freetype/fx_freetype.cpp
@@ -1,3 +1,4 @@
+#define DEFINE_PS_TABLES
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -6,7 +6,7 @@ index c73703f..ea601af 100644
#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_v128/zlib.h"
-#include "third_party/zlib/zlib.h"
+#include "zlib.h"
extern "C" {
......
--- core/fxge/ge/cfx_facecache.cpp
+++ core/fxge/ge/cfx_facecache.cpp
@@ -205,7 +205,8 @@
@@ -206,7 +206,8 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont,
}
}
} else {
- FXSYS_memset(pDestBuf, 0, dest_pitch * bmheight);
- memset(pDestBuf, 0, dest_pitch * bmheight);
+ if (dest_pitch != 0 && bmheight != 0)
+ FXSYS_memset(pDestBuf, 0, dest_pitch * bmheight);
+ memset(pDestBuf, 0, dest_pitch * bmheight);
if (anti_alias == FXFT_RENDER_MODE_MONO &&
FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
FXFT_PIXEL_MODE_MONO) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment