summaryrefslogtreecommitdiffstats
path: root/external/skia
Commit message (Collapse)AuthorAgeFilesLines
* implement xor drawing directly using Skia (tdf#141090)Luboš Luňák2021-11-292-0/+14
| | | | | | | | | | | | | | | Up until now this has been implemented like in almost all other VCL backends by manually xor-ing pixel values. But that required fetching pixel values from the GPU in Vulkan mode, which is relatively slow. Since some time Skia now has supported writing custom blending modes using the SkBlender class, so it's now possible to drop the hack and support xor drawing directly using a blender that does the operation. This should be both faster and simpler. Change-Id: Id751d0ed4034852ce68697ecf56cc6dfac95307f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126051 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* update Skia to chrome/m97Luboš Luňák2021-11-258-148/+128
| | | | | | | Change-Id: I55ab0b25389dcce3263b38a2de12c437b47751c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125821 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* try harder not to mix CPU-specific code with generic codeLuboš Luňák2021-10-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | Jenkins Windows builds occassionally fails with illegal instruction (https://ci.libreoffice.org/job/gerrit_windows/110191/console). This seems to be because those AVX etc. files use std::abs(double), which is really just a fancy inline function calling the real fabs() or whatever function. And in debug builds inlines do not get inlined, they get emitted as copies. And since arraysumAVX.cxx is listed as the first object for Library_sc, apparently the linker likes to pick up the AVX-compiled inline function as the std::abs() version to use for Library_sc. Try to avoid this in two ways: - move the CPU-specific object files later in the list of library files - use plain C headers in those sources, no fancy <cmath> Change-Id: Ifd14076f79e9fbd7cc4c4a63a9764dff6715e63a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124249 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* do not special-case Clang for Skia on Windows Arm64Luboš Luňák2021-09-211-4/+0
| | | | | | | | | | | | | | We hard-require Clang for Skia, because MSVC compiles it poorly. Somebody who doesn't want or can't use Clang may just as well use --disable-skia. This reverts commit 77ba9a095b0b3f429e006571e16f8320ba0bb61e. This reverts commit b36df65bb2393f8f46eea68c861d7570e7a772a1. Change-Id: If0310ce13e4023c6ae43f96447b48665ab7e4353 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122336 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* use clang-cl's -Zc:dllexportInlines- for Skia (tdf#144598)Luboš Luňák2021-09-201-0/+17
| | | | | | | | | | | | | | | | | | | | This is clang-cl's equivalent of -fvisibility-inlines-hidden, and it seems to be also sort of the equivalent of MSVC's -Zc:inline. So it saves build time and disk space. As an additional effect, this disables emitting copies of inlines functions in every .o file where the function is called (even if inlined), which means that it hopefully avoids the problem of SkOpts_avx.cpp generating a copy of SkRect::round() which would include AVX code, and the linker might select this as the instance of SkRect::round() to keep, thus making SSE2 code call AVX code without checking for AVX availability first. Change-Id: I97541ae11d05f489894bc9233271eb21fd520f43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122335 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* don't include Vulkan headers for Skia PCHLuboš Luňák2021-09-111-3/+1
| | | | | | | | | It's not built on Mac. Change-Id: Ica6aed9da51bb5cfd6dd1255e1231d5f0e53ba2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121926 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* patch Skia to search only system32/ for librariesLuboš Luňák2021-09-012-0/+14
| | | | | | | | | | | | | LO on Windows defaults to Vulkan, and Skia tries to load the vulkan DLL, which may not be present on some systems. The library AFAICT should always be in a system directory, so restrict library searching to just there to avoid the possibility of DLL hijacking, just to be safe. Change-Id: I78ad3c7297e613c0316e82c5ff3c0110a02da337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121437 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* update Skia to chrome/m94Luboš Luňák2021-08-2610-617/+196
| | | | | | | | | | | | | | | | Updating to m91 or newer required handling the problem with Vulkan crashing, but that's been finally fixed by the previous commit. This Skia version also requires at least freetype-2.8.1, so disable Skia if that's not available (LO's minimum is lower). Additionally patch out Skia's use of TT_SUPPORT_COLRV1, which seems to be an unstable freetype API from the git version and it doesn't even compile with the latest stable 2.9.11 release Change-Id: I4a17effb912468c43fc7cdb69fe453062e4d2447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120967 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* initial Metal support for Mac/SkiaLuboš Luňák2021-08-243-37/+288
| | | | | | | | | | | This also required changing SkiaSalGraphicsImpl to have sk_app::WindowContext as an internal detail inaccessible to the base class, since the Mac implementations cannot use it as is. Change-Id: I2424f0b887c79ee91c3bd0f1477b0745f9540247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120909 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* build Skia with Metal supportLuboš Luňák2021-08-243-8/+96
| | | | | | | Change-Id: I7a9abde4101164af8c47433acfa35f4f9d3b3d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120907 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* first WIP version of mac skia SalGraphics backendLuboš Luňák2021-08-231-6/+2
| | | | | | | | | It doesn't yet blit to screen, but the basics should be there. Change-Id: I0f77b66756f578d84d0cee16cda00e7a2fea714f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120805 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* fix Skia linking on MacLuboš Luňák2021-08-231-4/+2
| | | | | | | Change-Id: I4ae0ca2baedd533ee4dc115332255e334633cecf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120817 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* build Skia also on MacLuboš Luňák2021-07-262-7/+56
| | | | | | | | | This only builds the library, without using it. Change-Id: I54e940bcaa61852b831dbe7ae5660a5daf5fe609 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119356 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Revert "update Skia to chrome/m91" (tdf#141680)Luboš Luňák2021-04-147-58/+139
| | | | | | | | | | | | | | The m91 snapshot seems to cause a number of Vulkan problems. My commit already worked around one, but there are apparently others, such as very slow startup, or a failed Skia assertion triggered by VCL Skia's copyArea(). This reverts commit 09d850e46903a528d4b08d3fdf03c3964d79fbc5. Change-Id: I4f1832ba76db15cab8eccbe115d21c989da3c841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114089 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* update Skia to chrome/m91Luboš Luňák2021-04-127-139/+58
| | | | | | | Change-Id: I82050e9695b9aa49c33ee16d345bb64595b00bbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113978 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* speed up SkiaHelper::dump() in Skia debug buildsLuboš Luňák2021-03-291-1/+9
| | | | | | | Change-Id: Ic5c4bb38e9b8c0c1bb0e3efc2c5ee7a3fa787d93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113320 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Rename LO Windows arm64 ID to aarch64Jan-Marek Glogowski2021-03-231-1/+1
| | | | | | | | | | | | The Windows platform is called Arm64. But now that the ID for Mac is also going to be renamed from arm64 to aarch64, this get's rid of the arm64 as the UNO identifier and user in gbuild, just like on all other Arm64 platforms. Change-Id: I60a7eafd04b426f17b6e41ad9a09e6405c0d4173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112973 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* less complicated Skia SSSE3 loopLuboš Luňák2021-03-151-4/+2
| | | | | | | | | | I copy&pasted this from other code, but in this case it's simpler and less confusing to not overrun the output buffer. Change-Id: I782348d9870ac1e87c49e2267953c2f6299dbcd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112537 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* update Skia to chrome/m90Luboš Luňák2021-03-038-151/+154
| | | | | | | | | | Including chrome/m89, which wasn't included before because of tdf#140023. Change-Id: I64f1de8e10eab2d92a9383ce8104be5afca40101 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111792 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Revert "update Skia to chrome/m89" (tdf#140023)Luboš Luňák2021-02-087-116/+61
| | | | | | | | | | | | | | | | 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 <l.lunak@collabora.com>
* update Skia to chrome/m89Luboš Luňák2021-01-207-61/+116
| | | | | | | Change-Id: I82517728139a4b270d98e2694f2a21b248c80d4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109568 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Fix -Werror,-Wundef in Skia (at least for Raspberry pi 4)Julien Nabet2021-01-112-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Detected on Raspberry pi 4, for example: In file included from /home/pi/lo/libreoffice/vcl/skia/SkiaHelper.cxx:34: In file included from /home/pi/lo/libreoffice/vcl/inc/skia/utils.hxx:28: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkRegion.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkRect.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkPoint.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkMath.h:11: /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkTypes.h:371:5: error: 'SK_CPU_SSE_LEVEL' is not defined, evaluates to 0 [-Werror,-Wundef] if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 ^ ... but there are others, see: http://document-foundation-mail-archive.969070.n3.nabble.com/Building-LO-on-Raspberry-pi-4b-error-unknown-attribute-externally-visible-on-jni-part-tt4293505.html Since it may happen on some other envs and it can't be bad to explicitely initialize this preproc var, it seems relevant to use this patch unconditionally. Change-Id: Icc5794fcd3139cbdbd8d57a6938d31aee51a3e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109047 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* faster debug dumping for SkiaLuboš Luňák2021-01-072-1/+17
| | | | | | | | | | | | | | | | | | | Write out the png images as quickly as possible, with still at least minimal compression. Without compression the debug images are way too big, but otherwise it's preferred that this is fast (especially when possibly dumping thousands of images). Skia's PNG code ignores the quality and hardcodes the libpng defaults, so patch Skia to explicitly handle the quality we want. It'd be also possible to use SkPngEncoder directly, but SkImage makes it non-trivial to get at the pixel data if it's on the GPU, and the internal getROPixels() invoked by encodeToData() also caches the content, so be lazy and patch Skia. Change-Id: I09cc61115246de4fc9d076953eb7fec8140c32cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108668 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* better name for a helper Skia functionLuboš Luňák2020-12-094-11/+11
| | | | | | | | | | | What it really does is converting RGBA to R, so name it after what it does. That the result happens to be kind-of-grey of the RGBA is just a result of VCL providing the data that way. Change-Id: Ic017e34d91879679e0a7dad4d6ab35650fc3a89b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107408 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* external/skia: UBSan needs GrContext_Base RTTI nowStephan Bergmann2020-11-182-1/+34
| | | | | | | | | | | | | | | | | | | | | | ...in vcl: > [GAL] sounds > instdir/program/gengal.bin: symbol lookup error: instdir/program/libvcllo.so: undefined symbol: _ZTI14GrContext_Base > make[1]: *** [solenv/gbuild/Gallery.mk:56: workdir/Gallery/sounds.done] Error 1 (I didn't check what source exactly causes UBSan to require it now.) Marking both the class and some of its members as SK_API would cause MSVC to fail with > error: attribute 'dllexport' cannot be applied to member of 'dllexport' class so remove it from the class members. Change-Id: I9f5ed397d32f1f445bfa1d70bcff494e78c16046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106039 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* update Skia to chrome/m88Luboš Luňák2020-11-1710-132/+153
| | | | | | | Change-Id: I74c19597b07e9d07ee90e4191b75787241fdd845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105829 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Rename CLANG_CC, CLANG_CXX configuration vars (avoid clash with scan-build)Stephan Bergmann2020-10-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Clang's scan-build tool uses the CLANG_CXX environment variable (setting it up in the scan-build script to pass it to the ccc-analyzer script), but happens to erroneously set it to a non-existing path (see <https://reviews.llvm.org/D89481> "[scan-build] Fix clang++ pathname again"). So wrapping LO's autogen.sh and make in scan-build picked up that broken CLANG_CXX and caused build failures like > [CXX] external/skia/source/SkMemory_malloc.cxx > /bin/sh: ~/llvm/inst/bin/clang-12++: No such file or directory (see <https://lists.freedesktop.org/archives/libreoffice/2020-October/086113.html> "Re: llvm/clang static analyzer reports"). So rename CLANG_CXX, and for consistency also CLANG_CC and the various CLANG_CXXFLAGS_INTRINSICS_*, by prefixing each with LO_. Change-Id: Ib41cabe940f8bfb1997f74e865cca5725f859e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104383 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* track dirty areas for Skia drawingLuboš Luňák2020-10-082-0/+115
| | | | | | | | | | | | | | Updates to the screen in raster mode aren't _that_ slow, in fact it seems using SkRegion can make things slower because of manipulating the region, but with SkIRect this could sometimes help a bit. It also appears that StretchDIBits() that is used by the Windows raster code doesn't work correctly if only a subset of the y-axis range is specified, which reduces the usefulness. Change-Id: Ia93d2b60f2c62461e4c2c81210ab1d5d652a2cfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104047 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* skia: fix Windows Arm64 buildJan-Marek Glogowski2020-10-021-0/+4
| | | | | | | | | This uses MSVC instead of clang for this host. Change-Id: Idf96668e00563be12a7819a1658b657673733d21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103780 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* use -fpch-codegen rather than -fmodules-codegenLuboš Luňák2020-09-301-1/+1
| | | | | | | | | | | | | The -fmodules-codegen flag has been in Clang for quite a while, but it officially works with PCHs only with Clang11+, and even there's it's better to use the properly named -fpch-codegen. This also fixes a problem with Clang9 having only -fmodules-codegen but not the -fno-* variant, causing the build to break. Change-Id: I9a8c979426f95e8c1f77cbeab1df64390d7243b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103677 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* disable Clang's -fmodules-codegen for Skia if optimizing itLuboš Luňák2020-09-151-0/+1
| | | | | | | | | | | | | Skia is explicitly made to build optimized even in debug builds, unless --enable-skia=debug is given, so $(PCH_MODULES_CODEGEN) gets set even for it by com_GCC_class.mk , although normally it's disabled for optimized builds as not worth it. Explicitly disable the flag for Skia. Change-Id: Icf030f0bdc99dbc476af585937c864f951d2b7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102674 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* fix offsets in our SSSE3 Skia functions (tdf#136326)Luboš Luňák2020-09-031-2/+2
| | | | | | | | | 'src' is uint32_t, so that extra '*4' was wrong. Change-Id: Ie0628a72bd4f7eb3122e4b1d67b6bb759f74bc46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102007 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* remove some unused includes and update pchesCaolán McNamara2020-08-271-4/+5
| | | | | | | Change-Id: I786548bef39fa711aabcff32b592b3fdc4a6f9fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101486 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* Fix `--disable-pch` buildMike Kaganski2020-08-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... breaking after commit eaf4f6d3b1e64bc7b057e70cffe0bda0ed42c49f with this: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win.cpp:13: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/VulkanWindowContext.h:17: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\include/gpu/vk/GrVkBackendContext.h:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(141,12): error: member access into incomplete type 'GrDirectContext' obj->ref(); ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(226,40): note: in instantiation of function template specialization 'SkSafeRef<GrDirectContext>' requested here sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {} ^ C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/WindowContext.h(24,1): note: in instantiation of member function 'sk_sp<GrDirectContext>::sk_sp' requested here WindowContext { ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkImage.h(36,7): note: forward declaration of 'GrDirectContext' class GrDirectContext; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win.cpp:13: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/VulkanWindowContext.h:17: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\include/gpu/vk/GrVkBackendContext.h:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(150,12): error: member access into incomplete type 'GrDirectContext' obj->unref(); ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(251,9): note: in instantiation of function template specialization 'SkSafeUnref<GrDirectContext>' requested here SkSafeUnref(fPtr); ^ C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/WindowContext.h(24,1): note: in instantiation of member function 'sk_sp<GrDirectContext>::~sk_sp' requested here WindowContext { ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkImage.h(36,7): note: forward declaration of 'GrDirectContext' class GrDirectContext; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win.cpp:13: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/VulkanWindowContext.h:17: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\include/gpu/vk/GrVkBackendContext.h:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(264,25): error: no matching function for call to 'SkSafeRef' this->reset(SkSafeRef(that.get())); ^~~~~~~~~ C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/WindowContext.h(24,1): note: in instantiation of member function 'sk_sp<GrDirectContext>::operator=' requested here WindowContext { ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(139,40): note: candidate template ignored: substitution failure [with T = GrDirectContext] template <typename T> static inline T* SkSafeRef(T* obj) { ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(311,9): error: no matching function for call to 'SkSafeUnref' SkSafeUnref(oldPtr); ^~~~~~~~~~~ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(264,19): note: in instantiation of member function 'sk_sp<GrDirectContext>::reset' requested here this->reset(SkSafeRef(that.get())); ^ C:/lo/src/build/workdir/UnpackedTarball/skia\tools/sk_app/WindowContext.h(24,1): note: in instantiation of member function 'sk_sp<GrDirectContext>::operator=' requested here WindowContext { ^ C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkRefCnt.h(148,42): note: candidate template ignored: substitution failure [with T = GrDirectContext] template <typename T> static inline void SkSafeUnref(T* obj) { ^ 4 errors generated. Change-Id: I159b9ef388834a454eff58c6c2eda2e13dddb67a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101439 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* UBSan needs sk_app::WindowContext RTTI in Library_vclStephan Bergmann2020-08-261-0/+15
| | | | | | | | | | | | ...as seen during CppunitTest_basic_scanner: > DynamicLibraryManagerException: "Failed to load dynamic library: workdir/LinkTarget/CppunitTest/libtest_basic_scanner.so > instdir/program/libvcllo.so: undefined symbol: _ZTIN6sk_app13WindowContextE" Change-Id: I7c39d19fda3cdfe51b5ccf117ffe5c6c89863258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101410 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* update Skia to chrome/m86 snapshotLuboš Luňák2020-08-2612-197/+174
| | | | | | | Change-Id: Id0c0679bc1ca546a75f71d4716ba151ae46569bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101311 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* SvTreeListBox can move into toolkit headers nowCaolán McNamara2020-08-121-1/+2
| | | | | | | Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* Fix Skia build using VS 2019 v.16.7.0 with --disable-pchMike Kaganski2020-08-072-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No idea if updated VS makes a difference, or some recent Skia update... In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:11: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkPath.h:13: C:/lo/src/build/workdir/UnpackedTarball/skia\include/private/SkPathRef.h(113,41): error: implicit instantiation of undefined template 'std::tuple<SkPoint *, float *>' std::tuple<SkPoint*, SkScalar*> growForVerbsInPath(const SkPathRef& path) { ^ C:/PROGRA~2/MICROS~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include\utility(126,7): note: template is declared here class tuple; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:11: In file included from C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkPath.h:13: C:/lo/src/build/workdir/UnpackedTarball/skia\include/private/SkPathRef.h(114,30): error: implicit instantiation of undefined template 'std::tuple<SkPoint *, float *>' return fPathRef->growForVerbsInPath(path); ^ C:/PROGRA~2/MICROS~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include\utility(126,7): note: template is declared here class tuple; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkPath.h(1543,65): error: implicit instantiation of undefined template 'std::tuple<SkPathVerb, const SkPoint *, const float *>' std::tuple<SkPathVerb, const SkPoint*, const SkScalar*> operator*() const { ^ C:/PROGRA~2/MICROS~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include\utility(126,7): note: template is declared here class tuple; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkPath.h(1550,20): error: implicit instantiation of undefined template 'std::tuple<SkPathVerb, const SkPoint *, const float *>' return {verb, fPoints + backset, fWeights}; ^ C:/PROGRA~2/MICROS~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include\utility(126,7): note: template is declared here class tuple; ^ In file included from C:/lo/src/build/workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:11: C:/lo/src/build/workdir/UnpackedTarball/skia\include/core/SkPath.h(1625,68): error: implicit instantiation of undefined template 'std::tuple<SkPathVerb, const SkPoint *, const float *>' return (fIter != fEnd) ? static_cast<Verb>(std::get<0>(*fIter)) : kDone_Verb; ^ C:/PROGRA~2/MICROS~1/2019/COMMUN~1/VC/Tools/MSVC/1427~1.291/Include\utility(126,7): note: template is declared here class tuple; ^ 5 errors generated. make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:351: C:/lo/src/build/workdir/GenCxxObject/UnpackedTarball/skia/src/core/SkBitmapDevice.o] Error 1 Change-Id: Ica85829cf61d86e486cf4b2a730f50e06e3fb337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100271 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* optimize a bit more conversions to/from Skia bitmap formatsLuboš Luňák2020-07-297-30/+208
| | | | | | | | | | | It turns out this doesn't really matter in practice, since if converting between pixel formats is where time is spent, something higher must be already wrong. But since I've already written this... Change-Id: I25451664d529a9226d2d81b2c424a4f4e5422ad5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99577 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* external/skia: Fix previous std::result_of_t -> std::invoke_result_t changeStephan Bergmann2020-07-211-2/+2
| | | | | | | | | | ...84c412cb8392d306ab87fc06855677612f9938a6 "external/skia: Deprecated std::result_of_t has been removed from C++20" Change-Id: I7d14306039dbcdbc9509471402299d8cbb9e48c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* external/skia: Deprecated std::result_of_t has been removed from C++20Stephan Bergmann2020-07-202-0/+18
| | | | | | | | | | ...and is no longer provided at least by VS 2019 16.6.4 when using --with-latest-c++ Change-Id: I4655e2a2b3c4c9411ee6f5b9b42137e1bd7ac3fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99046 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* update pchesCaolán McNamara2020-07-121-4/+5
| | | | | | | Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
* update Skia to chrome/m85 snapshotLuboš Luňák2020-07-019-68/+133
| | | | | | | Change-Id: I3af3517c9c213e0db8365aecd0a008d817ca4dcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97592 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* direct 8bit gray -> RGBA conversion in SkiaSalBitmapLuboš Luňák2020-06-301-4/+10
| | | | | | | Change-Id: Ic77f9b8f9244e7fdaca78f91686645eee421d18f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97288 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* log properly the compiler used to compile SkiaLuboš Luňák2020-06-253-0/+35
| | | | | | | | | | | Using #define's directly from VCL will report the compiler used to compile VCL, which may be different from the one used for Skia. Also truncate the log file on opening. Change-Id: Iddf613613df20505f1abe1dd5468dcc8c7041410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97090 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* add debugging hints to Skia READMELuboš Luňák2020-06-221-2/+8
| | | | Change-Id: I32d9a8bf19cbff709c088c0e0a1d4830e877e88d
* external/skia: Mark c++20.patch.0 as reported upstreamStephan Bergmann2020-05-201-0/+2
| | | | | | | Change-Id: Ia8434915829682880c0f2161f935d6608a18fd81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94555 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* external/skia: Adapt to C++20 rewritten equality comparisonsStephan Bergmann2020-05-192-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | ...by avoiding the selection of rewritten ones that would use synthesized operator== with non-bool return type: > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1317:37: error: return type 'skvm::I32' of selected 'operator==' function for rewritten '==' comparison is not 'bool' > select(s == 0.0f , d * (1-src.a) > ~ ^ ~~~~ > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1217:17: note: in instantiation of function template specialization 'skvm::Builder::blend(SkBlendMode, skvm::Color, skvm::Color)::(anonymous class)::operator()<skvm::F32, skvm::F32>' requested here > fn(src.r, dst.r), > ^ > workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1311:43: note: in instantiation of function template specialization 'skvm::Builder::blend(SkBlendMode, skvm::Color, skvm::Color)::(anonymous class)::operator()<(lambda at workdir/UnpackedTarball/skia/src/core/SkVM.cpp:1311:44)>' requested here > return apply_rgb_srcover_a([&](auto s, auto d) { > ^ > workdir/UnpackedTarball/skia/src/core/SkVM.h:912:23: note: declared here > static inline I32 operator==(float x, F32 y) { return y->eq(x,y); } > ^ (There are more such operators here that could cause similar issues, but I only adapted the one that caused the overall build of LibreOffice to fail.) Change-Id: Ib880191f8bfa44dacb65692e27f32d2e62a96371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* update to Skia chrome/m84 snapshotLuboš Luňák2020-05-185-17/+60
| | | | | | | Change-Id: I7c5ad1673776fd0991a61b4c9f9a947e42764f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94414 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* avoid deep copies of pixels with Skia raster surfaces (tdf#132856)Luboš Luňák2020-05-112-0/+40
| | | | | | | | | | | | SkCanvas::draw() leads to deep copies of the source bitmap, moreover RasterWindowContext_win allocates the pixels in a way that SkSurface_Raster has to do a deep copy because of not owning the pixels. Change-Id: I22f6a2c0f96faf99f94140eff26ec0c22fae96d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93958 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>