download.lst | 4 ++-- external/pdfium/AndroidNDK19.patch.1 | 16 ---------------- external/pdfium/Library_pdfium.mk | 14 ++------------ external/pdfium/UnpackedTarball_pdfium.mk | 23 ++++------------------- external/pdfium/build.patch.1 | 13 ------------- external/pdfium/cg-instead-of-carbon.patch.1 | 23 ----------------------- external/pdfium/inc/pch/precompiled_pdfium.hxx | 25 +++++-------------------- 7 files changed, 13 insertions(+), 105 deletions(-)
New commits: commit 29ef644816c6ed90e4eabbfc76dbc688d99782bc Author: Miklos Vajna <[email protected]> AuthorDate: Wed Nov 9 13:19:49 2022 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Sat Sep 9 23:46:15 2023 +0200 Update pdfium to 5408 - drop cg-instead-of-carbon.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/99753 - drop AndroidNDK19.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/96530 - drop gcc-c++20-comparison.patch, no longer needed after <https://pdfium.googlesource.com/pdfium/+/065698acf82962a3168a0d56bb1d5964bc593d00> "Fix interaction between RetainPtr<T> and transparent comparisons" since chromium/5321 (cherry-pick from commit: 5a69fd3052bb638857f30a4cfd5913634275d23d) Change-Id: I1f861dd8a3d490400bb39c108bd4e767a2f45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156762 Tested-by: Thorsten Behrens <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/download.lst b/download.lst index 5c48673428df..5462bd75cdf1 100644 --- a/download.lst +++ b/download.lst @@ -454,8 +454,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := ecb9c2a0d777196949994946e3f24ed251ae5d3db8a9fa1e2827ef857151db13 -PDFIUM_TARBALL := pdfium-5298.tar.bz2 +PDFIUM_SHA256SUM := 7db59b1e91f2bc0ab4c5e19d1a4f881e6a47dbb0d3b7e980a7358225b12a0f35 +PDFIUM_TARBALL := pdfium-5408.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/AndroidNDK19.patch.1 b/external/pdfium/AndroidNDK19.patch.1 deleted file mode 100644 index f0d926f555d8..000000000000 --- a/external/pdfium/AndroidNDK19.patch.1 +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h ---- pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:01:25.705057178 +0200 -+++ pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:06:52.194081762 +0200 -@@ -15,6 +15,12 @@ - #endif - #if BUILDFLAG(IS_ANDROID) - #include <sys/prctl.h> -+#ifndef PR_SET_VMA -+#define PR_SET_VMA 0x53564d41 -+#endif -+#ifndef PR_SET_VMA_ANON_NAME -+#define PR_SET_VMA_ANON_NAME 0 -+#endif - #endif - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - #include <sys/resource.h> diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index c00a5f8f89e3..f137f851a0b2 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -244,9 +244,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageloader \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageimagecache \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \ @@ -566,17 +566,7 @@ endif # 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 \ UnpackedTarball/pdfium/third_party/base/debug/alias \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/oom_callback \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_bucket \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \ UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \ )) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index c1791ed8e823..b9dcd3b0507e 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -14,15 +14,10 @@ pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 pdfium_patches += c++20-comparison.patch -# Use CoreGraphics.h instead of Carbon.h -pdfium_patches += cg-instead-of-carbon.patch.1 -# Android NDK 19 - that is known to work well - does not have 2 defines -pdfium_patches += AndroidNDK19.patch.1 - -# Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 rewritten operator== -# recursive call mixing friend and external operators for template class" in GCC with -# --with-latest-c++: -pdfium_patches += gcc-c++20-comparison.patch +# Use CoreGraphics.h instead of Carbon.h -- https://pdfium-review.googlesource.com/c/pdfium/+/99753 +# pdfium_patches += cg-instead-of-carbon.patch.1 +# Android NDK 19 - that is known to work well - does not have 2 defines -- https://pdfium-review.googlesource.com/c/pdfium/+/96530 +# pdfium_patches += AndroidNDK19.patch.1 pdfium_patches += include.patch @@ -43,17 +38,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ 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/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 && \ mv third_party/base/debug/alias.cc third_party/base/debug/alias.cpp && \ - mv third_party/base/allocator/partition_allocator/oom_callback.cc third_party/base/allocator/partition_allocator/oom_callback.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \ - mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 35073e2c94d3..6f6a53a44ef3 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -158,16 +158,3 @@ index 29d3ee528..d5c7a1bc9 100644 OPJ_BOOL strict) { if (p_codec) { -diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp -index a17ec0353..3b024ac91 100644 ---- a/core/fpdfapi/parser/cpdf_data_avail.cpp -+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp -@@ -902,7 +902,7 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckResources( - CPDF_PageObjectAvail* resource_avail = - m_PagesResourcesAvail - .insert(std::make_pair( -- resources, -+ resources.Get(), - std::make_unique<CPDF_PageObjectAvail>( - GetValidator(), m_pDocument.Get(), resources.Get()))) - .first->second.get(); diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 b/external/pdfium/cg-instead-of-carbon.patch.1 deleted file mode 100644 index 055eac735307..000000000000 --- a/external/pdfium/cg-instead-of-carbon.patch.1 +++ /dev/null @@ -1,23 +0,0 @@ --*- Mode: Diff -*- ---- a/core/fxge/apple/fx_quartz_device.h -+++ b/core/fxge/apple/fx_quartz_device.h -@@ -7,7 +7,7 @@ - #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ - #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ - --#include <Carbon/Carbon.h> -+#include <CoreGraphics/CoreGraphics.h> - #include <stdint.h> - - #include "core/fxcrt/retain_ptr.h" ---- a/core/fpdfapi/font/cpdf_type1font.cpp -+++ b/core/fpdfapi/font/cpdf_type1font.cpp -@@ -19,7 +19,7 @@ - #include "core/fxge/fx_font.h" - - #if BUILDFLAG(IS_APPLE) --#include <Carbon/Carbon.h> -+#include <CoreGraphics/CoreGraphics.h> - #endif // BUILDFLAG(IS_APPLE) - - namespace { diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 21bc61f05fb3..315b5d81ec12 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2020-09-21 15:21:21 using: + Generated on 2022-11-08 17:05:53 using: ./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -31,7 +31,6 @@ #include <agg_vcgen_stroke.h> #include <algorithm> #include <array> -#include <atomic> #include <cassert> #include <cfloat> #include <climits> @@ -127,11 +126,13 @@ #include <core/fpdfapi/page/cpdf_graphicstates.h> #include <core/fpdfapi/page/cpdf_iccprofile.h> #include <core/fpdfapi/page/cpdf_image.h> +#include <core/fpdfapi/page/cpdf_imageloader.h> #include <core/fpdfapi/page/cpdf_imageobject.h> #include <core/fpdfapi/page/cpdf_indexedcs.h> #include <core/fpdfapi/page/cpdf_meshstream.h> #include <core/fpdfapi/page/cpdf_occontext.h> #include <core/fpdfapi/page/cpdf_page.h> +#include <core/fpdfapi/page/cpdf_pageimagecache.h> #include <core/fpdfapi/page/cpdf_pagemodule.h> #include <core/fpdfapi/page/cpdf_pageobject.h> #include <core/fpdfapi/page/cpdf_pageobjectholder.h> @@ -189,9 +190,7 @@ #include <core/fpdfapi/render/charposlist.h> #include <core/fpdfapi/render/cpdf_devicebuffer.h> #include <core/fpdfapi/render/cpdf_docrenderdata.h> -#include <core/fpdfapi/render/cpdf_imageloader.h> #include <core/fpdfapi/render/cpdf_imagerenderer.h> -#include <core/fpdfapi/render/cpdf_pagerendercache.h> #include <core/fpdfapi/render/cpdf_pagerendercontext.h> #include <core/fpdfapi/render/cpdf_progressiverenderer.h> #include <core/fpdfapi/render/cpdf_rendercontext.h> @@ -309,6 +308,8 @@ #include <core/fxcrt/css/cfx_cssvaluelistparser.h> #include <core/fxcrt/data_vector.h> #include <core/fxcrt/fileaccess_iface.h> +#include <core/fxcrt/fixed_try_alloc_zeroed_data_vector.h> +#include <core/fxcrt/fixed_uninit_data_vector.h> #include <core/fxcrt/fx_bidi.h> #include <core/fxcrt/fx_codepage.h> #include <core/fxcrt/fx_coordinates.h> @@ -461,22 +462,6 @@ #include <third_party/agg23/agg_rasterizer_scanline_aa.h> #include <third_party/agg23/agg_renderer_scanline.h> #include <third_party/agg23/agg_scanline_u.h> -#include <third_party/base/allocator/partition_allocator/address_space_randomization.h> -#include <third_party/base/allocator/partition_allocator/oom.h> -#include <third_party/base/allocator/partition_allocator/oom_callback.h> -#include <third_party/base/allocator/partition_allocator/page_allocator.h> -#include <third_party/base/allocator/partition_allocator/page_allocator_internal.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc_check.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc_constants.h> -#include <third_party/base/allocator/partition_allocator/partition_bucket.h> -#include <third_party/base/allocator/partition_allocator/partition_direct_map_extent.h> -#include <third_party/base/allocator/partition_allocator/partition_oom.h> -#include <third_party/base/allocator/partition_allocator/partition_page.h> -#include <third_party/base/allocator/partition_allocator/partition_root_base.h> -#include <third_party/base/allocator/partition_allocator/random.h> -#include <third_party/base/allocator/partition_allocator/spin_lock.h> -#include <third_party/base/bits.h> #include <third_party/base/check.h> #include <third_party/base/check_op.h> #include <third_party/base/compiler_specific.h>
