From 0a76b8ebbaf934faad27ddb3a4e951b9c743e536 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Sun, 7 Feb 2021 21:11:59 +0100 Subject: Revert "update Skia to chrome/m89" (tdf#140023) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That update started using SkSamplingOptions to specify image scaling quality. Some places using SkImage::makeShader() should use the quality instead of default SkSamplingOptions ctor, but even with that fix the test document still uses the default nearest quality. Since chrome/m90 will introduce further changes related to this, I'll just revert to m88 and revisit this with m90. This reverts commit 2cf9b8e265e9694803f55e30f2f392abfa512a5a. Change-Id: Iea0e57b7e7b804675d393e4088532a6f617bfd43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110541 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- download.lst | 4 +-- external/skia/Library_skia.mk | 22 +++--------- external/skia/UnpackedTarball_skia.mk | 2 +- external/skia/fix-pch.patch.1 | 20 +++++------ external/skia/fix-warnings.patch.1 | 28 --------------- external/skia/fontconfig-get-typeface.patch.0 | 50 +++++++++++---------------- external/skia/inc/pch/precompiled_skia.hxx | 43 +++++++---------------- external/skia/lerp.patch | 12 +++++++ vcl/skia/SkiaHelper.cxx | 3 +- vcl/skia/gdiimpl.cxx | 3 +- vcl/skia/salbmp.cxx | 4 +-- 11 files changed, 67 insertions(+), 124 deletions(-) delete mode 100644 external/skia/fix-warnings.patch.1 create mode 100644 external/skia/lerp.patch diff --git a/download.lst b/download.lst index 01ad47dbbe3e..57325a8d30c2 100644 --- a/download.lst +++ b/download.lst @@ -241,8 +241,8 @@ export RHINO_SHA256SUM := 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip export SERF_SHA256SUM := 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700 export SERF_TARBALL := serf-1.2.1.tar.bz2 -export SKIA_SHA256SUM := da6d48be42db008bcbc6f086b88b423e9864601ad30adb1b7a66a927d7568680 -export SKIA_TARBALL := skia-m89-15595ea39c4442ded546ba36ef63a521240bc0f4.tar.xz +export SKIA_SHA256SUM := f293656a15342a53bb407b932fc907c6894178a162f09728bd383e24d84b1301 +export SKIA_TARBALL := skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz export STAROFFICE_SHA256SUM := f94fb0ad8216f97127bedef163a45886b43c62deac5e5b0f5e628e234220c8db export STAROFFICE_VERSION_MICRO := 7 export STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 8c805fd787dd..87ae0c64552f 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -137,6 +137,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkBBHFactory \ UnpackedTarball/skia/src/core/SkBigPicture \ UnpackedTarball/skia/src/core/SkBitmapCache \ + UnpackedTarball/skia/src/core/SkBitmapController \ UnpackedTarball/skia/src/core/SkBitmap \ UnpackedTarball/skia/src/core/SkBitmapDevice \ UnpackedTarball/skia/src/core/SkBitmapProcState \ @@ -229,10 +230,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkMD5 \ UnpackedTarball/skia/src/core/SkMiniRecorder \ UnpackedTarball/skia/src/core/SkMipmap \ - UnpackedTarball/skia/src/core/SkMipmapAccessor \ UnpackedTarball/skia/src/core/SkModeColorFilter \ UnpackedTarball/skia/src/core/SkOpts \ - UnpackedTarball/skia/src/core/SkOpts_erms \ UnpackedTarball/skia/src/core/SkOverdrawCanvas \ UnpackedTarball/skia/src/core/SkPaint \ UnpackedTarball/skia/src/core/SkPaintPriv \ @@ -274,6 +273,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkRRect \ UnpackedTarball/skia/src/core/SkRTree \ UnpackedTarball/skia/src/core/SkRuntimeEffect \ + UnpackedTarball/skia/src/core/SkRWBuffer \ UnpackedTarball/skia/src/core/SkScalar \ UnpackedTarball/skia/src/core/SkScalerCache \ UnpackedTarball/skia/src/core/SkScalerContext \ @@ -323,6 +323,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkXfermodeInterpretation \ UnpackedTarball/skia/src/core/SkYUVAInfo \ UnpackedTarball/skia/src/core/SkYUVAPixmaps \ + UnpackedTarball/skia/src/core/SkYUVASizeInfo \ UnpackedTarball/skia/src/core/SkYUVMath \ UnpackedTarball/skia/src/core/SkYUVPlanesCache \ UnpackedTarball/skia/src/c/sk_effects \ @@ -428,11 +429,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/shaders/SkPerlinNoiseShader \ UnpackedTarball/skia/src/shaders/SkPictureShader \ UnpackedTarball/skia/src/shaders/SkShader \ - UnpackedTarball/skia/src/sksl/dsl/DSLCore \ - UnpackedTarball/skia/src/sksl/dsl/DSLExpression \ - UnpackedTarball/skia/src/sksl/dsl/DSLType \ - UnpackedTarball/skia/src/sksl/dsl/DSLVar \ - UnpackedTarball/skia/src/sksl/dsl/priv/DSLWriter \ UnpackedTarball/skia/src/sksl/ir/SkSLConstructor \ UnpackedTarball/skia/src/sksl/ir/SkSLPrefixExpression \ UnpackedTarball/skia/src/sksl/ir/SkSLSetting \ @@ -445,8 +441,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/sksl/SkSLByteCodeGenerator \ UnpackedTarball/skia/src/sksl/SkSLCFGGenerator \ UnpackedTarball/skia/src/sksl/SkSLCompiler \ - UnpackedTarball/skia/src/sksl/SkSLConstantFolder \ - UnpackedTarball/skia/src/sksl/SkSLContext \ UnpackedTarball/skia/src/sksl/SkSLCPPCodeGenerator \ UnpackedTarball/skia/src/sksl/SkSLCPPUniformCTypes \ UnpackedTarball/skia/src/sksl/SkSLDehydrator \ @@ -455,7 +449,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/sksl/SkSLIRGenerator \ UnpackedTarball/skia/src/sksl/SkSLInliner \ UnpackedTarball/skia/src/sksl/SkSLLexer \ - UnpackedTarball/skia/src/sksl/SkSLMangler \ UnpackedTarball/skia/src/sksl/SkSLMetalCodeGenerator \ UnpackedTarball/skia/src/sksl/SkSLOutputStream \ UnpackedTarball/skia/src/sksl/SkSLParser \ @@ -468,7 +461,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/sksl/SkSLSectionAndParameterHelper \ UnpackedTarball/skia/src/sksl/SkSLString \ UnpackedTarball/skia/src/sksl/SkSLUtil \ - UnpackedTarball/skia/src/sksl/SkSLVMGenerator \ UnpackedTarball/skia/src/utils/SkBase64 \ UnpackedTarball/skia/src/utils/SkCamera \ UnpackedTarball/skia/src/utils/SkCanvasStack \ @@ -598,7 +590,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer \ UnpackedTarball/skia/src/gpu/gradients/GrGradientBitmapCache \ UnpackedTarball/skia/src/gpu/gradients/GrGradientShader \ - UnpackedTarball/skia/src/gpu/GrAATriangulator \ UnpackedTarball/skia/src/gpu/GrAHardwareBufferImageGenerator \ UnpackedTarball/skia/src/gpu/GrAHardwareBufferUtils \ UnpackedTarball/skia/src/gpu/GrAttachment \ @@ -623,7 +614,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrCopyRenderTask \ UnpackedTarball/skia/src/gpu/GrDataUtils \ UnpackedTarball/skia/src/gpu/GrDDLContext \ - UnpackedTarball/skia/src/gpu/GrDDLTask \ UnpackedTarball/skia/src/gpu/GrDefaultGeoProcFactory \ UnpackedTarball/skia/src/gpu/GrDirectContext \ UnpackedTarball/skia/src/gpu/GrDirectContextPriv \ @@ -668,6 +658,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrRectanizerSkyline \ UnpackedTarball/skia/src/gpu/GrRenderTask \ UnpackedTarball/skia/src/gpu/GrReducedClip \ + UnpackedTarball/skia/src/gpu/GrRenderTargetContext \ UnpackedTarball/skia/src/gpu/GrRenderTarget \ UnpackedTarball/skia/src/gpu/GrRenderTargetProxy \ UnpackedTarball/skia/src/gpu/GrResourceAllocator \ @@ -686,8 +677,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrStencilSettings \ UnpackedTarball/skia/src/gpu/GrStyle \ UnpackedTarball/skia/src/gpu/GrSurfaceContext \ - UnpackedTarball/skia/src/gpu/GrSurfaceDrawContext \ - UnpackedTarball/skia/src/gpu/GrSurfaceFillContext \ UnpackedTarball/skia/src/gpu/GrSurface \ UnpackedTarball/skia/src/gpu/GrSurfaceProxy \ UnpackedTarball/skia/src/gpu/GrSwizzle \ @@ -708,7 +697,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrWaitRenderTask \ UnpackedTarball/skia/src/gpu/GrXferProcessor \ UnpackedTarball/skia/src/gpu/GrYUVABackendTextures \ - UnpackedTarball/skia/src/gpu/GrYUVATextureProxies \ UnpackedTarball/skia/src/gpu/mock/GrMockCaps \ UnpackedTarball/skia/src/gpu/mock/GrMockGpu \ UnpackedTarball/skia/src/gpu/mock/GrMockTypes \ @@ -751,7 +739,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/tessellate/GrFillPathShader \ UnpackedTarball/skia/src/gpu/tessellate/GrPathTessellateOp \ UnpackedTarball/skia/src/gpu/tessellate/GrStencilPathShader \ - UnpackedTarball/skia/src/gpu/tessellate/GrStrokeIndirectOp \ UnpackedTarball/skia/src/gpu/tessellate/GrStrokeOp \ UnpackedTarball/skia/src/gpu/tessellate/GrStrokeTessellateOp \ UnpackedTarball/skia/src/gpu/tessellate/GrStrokeTessellateShader \ @@ -782,7 +769,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/vk/GrVkImage \ UnpackedTarball/skia/src/gpu/vk/GrVkImageView \ UnpackedTarball/skia/src/gpu/vk/GrVkInterface \ - UnpackedTarball/skia/src/gpu/vk/GrVkMSAALoadManager \ UnpackedTarball/skia/src/gpu/vk/GrVkMemory \ UnpackedTarball/skia/src/gpu/vk/GrVkMeshBuffer \ UnpackedTarball/skia/src/gpu/vk/GrVkOpsRenderPass \ diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index e1ea21b3cd35..0da268a17406 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,skia,$(SKIA_TARBALL))) # * c++20.patch.0 has been reported upstream at # "C++20 operator== issue": skia_patches := \ + lerp.patch \ fix-pch.patch.1 \ fix-ddi.patch \ make-api-visible.patch.1 \ @@ -38,7 +39,6 @@ skia_patches := \ ubsan.patch.0 \ fast-png-write.patch.1 \ skia_sk_cpu_sse_level_0_by_default.patch.1 \ - fix-warnings.patch.1 \ $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1)) diff --git a/external/skia/fix-pch.patch.1 b/external/skia/fix-pch.patch.1 index 14199fc2feb2..8fb6ea870c10 100644 --- a/external/skia/fix-pch.patch.1 +++ b/external/skia/fix-pch.patch.1 @@ -1,8 +1,8 @@ diff --git a/include/core/SkColor.h b/include/core/SkColor.h -index 9cba771ddd..6d324b75d0 100644 +index 36527e38e5..ef9065ce75 100644 --- a/include/core/SkColor.h +++ b/include/core/SkColor.h -@@ -420,6 +420,7 @@ using SkColor4f = SkRGBA4f; +@@ -414,6 +414,7 @@ using SkColor4f = SkRGBA4f; template <> SK_API SkColor4f SkColor4f::FromColor(SkColor); template <> SK_API SkColor SkColor4f::toSkColor() const; @@ -35,10 +35,10 @@ index 248917423f..3d0bc00307 100644 SkASSERT(far > near); diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp -index 76f69754c6..01ce4a1e2d 100644 +index 628e135348..5173a54575 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp -@@ -3531,6 +3531,8 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { +@@ -3561,6 +3561,8 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { } } @@ -48,10 +48,10 @@ index 76f69754c6..01ce4a1e2d 100644 SkASSERT(this->caps()->requiresManualFBBarrierAfterTessellatedStencilDraw()); GL_CALL(MemoryBarrier(GR_GL_FRAMEBUFFER_BARRIER_BIT)); diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h -index c973384081..8943198ddd 100644 +index 1e6dd9e02b..d917b0e0be 100644 --- a/src/gpu/text/GrTextBlobCache.h +++ b/src/gpu/text/GrTextBlobCache.h -@@ -91,4 +91,6 @@ private: +@@ -93,4 +93,6 @@ private: SkMessageBus::Inbox fPurgeBlobInbox SK_GUARDED_BY(fSpinLock); }; @@ -84,7 +84,7 @@ index af4909aaaf..825ec35c83 100644 #include diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc -index 4f983439b9..f6fc53c91a 100644 +index 3b7806081c..a76eb0a451 100644 --- a/third_party/skcms/skcms.cc +++ b/third_party/skcms/skcms.cc @@ -130,7 +130,8 @@ static float minus_1_ulp(float x) { @@ -95,9 +95,9 @@ index 4f983439b9..f6fc53c91a 100644 +enum TFKind_skcms { Bad, sRGBish, PQish, HLGish, HLGinvish }; +#define TFKind TFKind_skcms struct TF_PQish { float A,B,C,D,E,F; }; - struct TF_HLGish { float R,G,a,b,c,K_minus_1; }; - // We didn't originally support a scale factor K for HLG, and instead just stored 0 in -@@ -2059,7 +2060,9 @@ typedef enum { + struct TF_HLGish { float R,G,a,b,c; }; + +@@ -2047,7 +2048,9 @@ typedef enum { Op_store_hhhh, Op_store_fff, Op_store_ffff, diff --git a/external/skia/fix-warnings.patch.1 b/external/skia/fix-warnings.patch.1 deleted file mode 100644 index fc9418739810..000000000000 --- a/external/skia/fix-warnings.patch.1 +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/core/SkFontParameters.h b/include/core/SkFontParameters.h -index ae4f1d68b6..71263da7c5 100644 ---- a/include/core/SkFontParameters.h -+++ b/include/core/SkFontParameters.h -@@ -16,8 +16,8 @@ struct SkFontParameters { - // Parameters in a variation font axis. - struct Axis { - constexpr Axis() : tag(0), min(0), def(0), max(0), flags(0) {} -- constexpr Axis(SkFourByteTag tag, float min, float def, float max, bool hidden) : -- tag(tag), min(min), def(def), max(max), flags(hidden ? HIDDEN : 0) {} -+ constexpr Axis(SkFourByteTag _tag, float _min, float _def, float _max, bool hidden) : -+ tag(_tag), min(_min), def(_def), max(_max), flags(hidden ? HIDDEN : 0) {} - - // Four character identifier of the font axis (weight, width, slant, italic...). - SkFourByteTag tag; -diff --git a/tools/sk_app/WindowContext.h b/tools/sk_app/WindowContext.h -index f143dab013..be3cde0f4f 100644 ---- a/tools/sk_app/WindowContext.h -+++ b/tools/sk_app/WindowContext.h -@@ -31,7 +31,7 @@ public: - - virtual void resize(int w, int h) = 0; - -- virtual void activate(bool isActive) {} -+ virtual void activate(bool /*isActive*/) {} - - const DisplayParams& getDisplayParams() { return fDisplayParams; } - virtual void setDisplayParams(const DisplayParams& params) = 0; diff --git a/external/skia/fontconfig-get-typeface.patch.0 b/external/skia/fontconfig-get-typeface.patch.0 index 20c3f5b9cbe0..a7a82bfa07f4 100644 --- a/external/skia/fontconfig-get-typeface.patch.0 +++ b/external/skia/fontconfig-get-typeface.patch.0 @@ -1,40 +1,32 @@ -diff --git a/include/ports/SkFontMgr_fontconfig.h b/include/ports/SkFontMgr_fontconfig.h -index 4b2bb2d297..2b82cbfedd 100644 ---- include/ports/SkFontMgr_fontconfig.h -+++ include/ports/SkFontMgr_fontconfig.h -@@ -19,4 +19,9 @@ class SkFontMgr; - */ - SK_API sk_sp SkFontMgr_New_FontConfig(FcConfig* fc); - -+struct _FcPattern; -+typedef struct _FcPattern FcPattern; -+class SkTypeface; -+SK_API sk_sp SkFontMgr_createTypefaceFromFcPattern(const sk_sp& mgr, FcPattern* pattern); -+ - #endif // #ifndef SkFontMgr_fontconfig_DEFINED -diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp -index c2da39b28f..28483faf02 100644 ---- src/ports/SkFontMgr_fontconfig.cpp -+++ src/ports/SkFontMgr_fontconfig.cpp -@@ -690,6 +690,7 @@ class SkFontMgr_fontconfig : public SkFontMgr { +--- ./src/ports/SkFontMgr_fontconfig.cpp.sav 2020-01-20 16:42:51.322186451 +0100 ++++ ./src/ports/SkFontMgr_fontconfig.cpp 2020-03-13 11:25:15.793936659 +0100 +@@ -699,6 +699,7 @@ class SkFontMgr_fontconfig : public SkFo /** Creates a typeface using a typeface cache. * @param pattern a complete pattern from FcFontRenderPrepare. */ +public: - sk_sp createTypefaceFromFcPattern(SkAutoFcPattern pattern) const { - if (!pattern) { - return nullptr; -@@ -1043,3 +1044,13 @@ protected: + sk_sp createTypefaceFromFcPattern(FcPattern* pattern) const { + FCLocker::AssertHeld(); + SkAutoMutexExclusive ama(fTFCacheMutex); +@@ -1039,3 +1040,9 @@ protected: SK_API sk_sp SkFontMgr_New_FontConfig(FcConfig* fc) { return sk_make_sp(fc); } + +SK_API sk_sp SkFontMgr_createTypefaceFromFcPattern(const sk_sp& mgr, FcPattern* pattern) +{ -+ SkAutoFcPattern p([pattern]() { -+ FCLocker lock; -+ FcPatternReference(pattern); -+ return pattern; -+ }()); -+ return static_cast(mgr.get())->createTypefaceFromFcPattern(std::move(p)); ++ FCLocker lock; ++ return static_cast(mgr.get())->createTypefaceFromFcPattern(pattern); +} +--- ./include/ports/SkFontMgr_fontconfig.h.sav 2019-09-19 11:38:00.943185323 +0200 ++++ ./include/ports/SkFontMgr_fontconfig.h 2020-03-13 11:31:48.025716543 +0100 +@@ -19,4 +19,9 @@ class SkFontMgr; + */ + SK_API sk_sp SkFontMgr_New_FontConfig(FcConfig* fc); + ++struct _FcPattern; ++typedef struct _FcPattern FcPattern; ++class SkTypeface; ++SK_API sk_sp SkFontMgr_createTypefaceFromFcPattern(const sk_sp& mgr, FcPattern* pattern); ++ + #endif // #ifndef SkFontMgr_fontconfig_DEFINED diff --git a/external/skia/inc/pch/precompiled_skia.hxx b/external/skia/inc/pch/precompiled_skia.hxx index 4e508931fc75..b4f9ea92f0af 100644 --- a/external/skia/inc/pch/precompiled_skia.hxx +++ b/external/skia/inc/pch/precompiled_skia.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 2021-01-18 18:16:50 using: + Generated on 2020-11-13 19:45:52 using: ./bin/update_pch external/skia skia --cutoff=1 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -140,6 +139,7 @@ #include #include #include +#include #include #include #include @@ -163,8 +163,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -316,6 +318,7 @@ #include #include #include +#include #include #include #include @@ -391,8 +394,6 @@ #include #include #include -#include -#include #include #include #include @@ -431,7 +432,6 @@ #include #include #include -#include #include #include #include @@ -458,6 +458,7 @@ #include #include #include +#include #include #include #include @@ -476,7 +477,6 @@ #include #include #include -#include #include #include #include @@ -485,7 +485,6 @@ #include #include #include -#include #include #include #include @@ -513,7 +512,6 @@ #include #include #include -#include #include #include #include @@ -566,6 +564,8 @@ #include #include #include +#include +#include #include #include #include @@ -592,14 +592,11 @@ #include #include #include -#include -#include +#include #include #include #include #include -#include -#include #include #include #include @@ -615,13 +612,12 @@ #include #include #include +#include #include #include -#include #include #include #include -#include #include #include #include @@ -771,8 +767,6 @@ #include #include #include -#include -#include #include #include #include @@ -799,7 +793,6 @@ #include #include #include -#include #include #include #include @@ -886,20 +879,15 @@ #include #include #include -#include #include -#include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -912,12 +900,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include #include @@ -931,7 +913,7 @@ #include #include #include -#include +#include #include #include #include @@ -950,6 +932,7 @@ #include #include #include +#include #include #include #include @@ -958,7 +941,6 @@ #include #include #include -#include #include #include #include @@ -972,6 +954,7 @@ #include #include #include +#include #include #include #include diff --git a/external/skia/lerp.patch b/external/skia/lerp.patch new file mode 100644 index 000000000000..2062c21f2df0 --- /dev/null +++ b/external/skia/lerp.patch @@ -0,0 +1,12 @@ +diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp +index 812dc1694f..60b8d617c6 100644 +--- a/src/shaders/SkPerlinNoiseShader.cpp ++++ b/src/shaders/SkPerlinNoiseShader.cpp +@@ -573,6 +573,7 @@ static SkScalar fade(SkScalar t) { + return t * t * t * (t * (t * 6 - 15) + 10); + } + ++#define lerp skia_lerp + static SkScalar lerp(SkScalar t, SkScalar a, SkScalar b) { + return a + t * (b - a); + } diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index 767428fa4339..b2da1e4b1ef8 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -606,8 +606,7 @@ void prefillSurface(const sk_sp& surface) bitmap.setImmutable(); SkPaint paint; paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha - paint.setShader( - bitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, SkSamplingOptions())); + paint.setShader(bitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat)); surface->getCanvas()->drawPaint(paint); } diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index b2c6598edea4..f9fdfcaa1300 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -1473,8 +1473,7 @@ void SkiaSalGraphicsImpl::invert(basegfx::B2DPolygon const& rPoly, SalInvert eFl aBitmap.setImmutable(); // The bitmap is repeated in both directions the checker pattern is as big // as the polygon (usually rectangle) - aPaint.setShader( - aBitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat, SkSamplingOptions())); + aPaint.setShader(aBitmap.makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat)); } if (!intelHack) getDrawCanvas()->drawPath(aPath, aPaint); diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index a8d4acc7bc27..70405e2b5111 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -896,14 +896,14 @@ sk_sp SkiaSalBitmap::GetSkShader() const { if (mEraseColorSet) return SkShaders::Color(toSkColor(mEraseColor)); - return GetSkImage()->makeShader(SkSamplingOptions()); + return GetSkImage()->makeShader(); } sk_sp SkiaSalBitmap::GetAlphaSkShader() const { if (mEraseColorSet) return SkShaders::Color(fromEraseColorToAlphaImageColor(mEraseColor)); - return GetAlphaSkImage()->makeShader(SkSamplingOptions()); + return GetAlphaSkImage()->makeShader(); } bool SkiaSalBitmap::IsFullyOpaqueAsAlpha() const -- cgit