summaryrefslogtreecommitdiff
path: root/vcl/win
AgeCommit message (Collapse)Author
2020-06-26vcl: split off QueueInfo to own filesChris Sherlock
Change-Id: Ib2904066edd371229c5daa09b81b210e99853895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96251 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-22Prefer CoInitializeEx instead of CoInitializeJulien Nabet
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-22convert properly SkiaSalBitmap to WinSalBitmap (tdf#133152)Luboš Luňák
The code didn't account for topdown bitmaps. Change-Id: Ia326834cfd6d2d022579fdde24828f7e0a8d8b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94643 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-15use more try_emplaceNoel Grandin
specifically looking for the pattern if (map.find(...) == map.end() map[...] = value Change-Id: I99f20d73f6e71a10726c9d39d8644c2e51120091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94151 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-05fix line width in DrawPolyLine() with matrix (tdf#132498)Luboš Luňák
For backends that do the object-to-device coordinates transformation directly, it's necessary to also convert the size of line width. But simply multiplying it with the matrix can also rotate the line width "vector", making it e.g. negative. So don't use just the X coordinate, use vector length for the transformation, which is ok. In fact it doesn't even make sense to treat width as a vector, because a width simply is not a vector (and for this reason it's also not actually used). Change-Id: I1241c9cb29155df105170d568a879ebc32b11a5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93203 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2020-05-04remove old Skia text render methods that do not use Skia directlyLuboš Luňák
The cairo-based method on Unix and manual glyph handling way taken from GL on Windows should be longer be needed, now that using Skia itself for text rendering seems to work fine. This reverts more or less reverts the following commits: b1d3ef798a89d11b853c467fa9ce0fe6ed235735 5ac9a62f3a354db80837bdd1c95b763989b303bb 619959827003814053a5e9ec81acfd07b3aa270a 6f5c85daa0e5073d87d1d7699bfa59af159686ca ad3580df085b3a3d66eb73cae997ea5ca178ccc1 f109a1ac6fdf0c878d53dfea6fceffd93248608f 59205c742c43b4c456b69c3fd94e7fa35ff3eec0 Change-Id: Ib28b2469c7d6471c227bb2aa08d5485bb24c2fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93428 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-15add an IsEmpty method to tools::Size and use itNoel Grandin
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-10prefer DirectWrite for Skia's Windows text renderingLuboš Luňák
Change-Id: Ibfb6206751126def10905bb22effbe1a947cd6d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91968 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-18implement text rendering using directly Skia (Windows)Luboš Luňák
The Windows code needed for Skia text rendering. Like with the X11 code, the font is slightly lighter than with Skia disabled, but otherwise it seems to work. And like the X11 code this also requires patching Skia to use the font we want. Change-Id: Ib5ba52e4ba51b6523617072b77ed5446e7343f46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90582 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-18use DEFAULT_QUALITY for font rendering with Skia on WindowsLuboš Luňák
I don't know why tdf#98380 explicitly forced ANTIALIASED_QUALITY, for OpenGL, but with Skia this breaks subpixel AA on LCDs, where the actual value should be CLEARTYPE_QUALITY. But DEFAULT_QUALITY simply seems to do the job no matter what. Maybe the problem with OpenGL was that our code there handles glyphs as monochrome, but Skia can handle colors, which is necessary for subpixel AA. Change-Id: Id7081b120f8e754deb4793423d157a8837e959aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-16Some more checks for correct screen sizeSamuel Mehrbrodt
Change-Id: Id5a811e4227052fd9117ab2b099de31e8e3b90c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90413 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-03-12rework Skia setupLuboš Luňák
Calls to SkiaHelper::isVCLSkiaEnabled() may be done from many places, even if LO uses a VCL plugin that doesn't use Skia, which leads to the Skia code not being prepared properly (and crashing/asserting). So make the SalInstance of those relevant VCL plugins call a setup function that is required for Skia actually getting enabled. Avoids crashes/asserts in the About dialog if the Skia UI checkbox is enabled but e.g. the KF5 VCL plugin is actually used. Change-Id: Ib56a5f32e88bd130a4c564031313f85e99898ba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90376 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-03-11WIN add bootstrap var to re-enable foreground hackJan-Marek Glogowski
We already found a regressed installation from commit 518c0265efebf39ab6d1e90c4ec4e7cf52b701c6 ("WIN prevent deadlock in SetForegroundWindow"). Finding a real fix might be impossible, so this just adds the bootstrap.ini boolean variable Win32.EnableAttachThreadInputHack to re-enable the previous AttachThreadInput hack on demand. Change-Id: I3b6d770b060b5dee60e02a5aa85efb8a51518c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90235 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-03-06tdf#125532: White text on default/action buttons and selected tabs on macOSThorsten Wagner
Change-Id: I58ce75e711504553c8fc606382866754286f1aa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89313 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-06tdf#124848 partial refactor hairline logicArmin Le Grand
With the handover of transformations to line draw calls it is no longer feasible to detect and prepare LineWidth stuff when the old office definition for hairlnes is used, a line width of zero. It was managed in the system-independent part, but now may have to be prepared in logic and not discrete (pixel) coordinates. To do so, find and cleanup all places where 1/1.0 was used as hairline line width. Adapt all seven graphic subsystems to handle the line width == 0/0.0 cases accordingly. Test as good as possible. Change-Id: I2badc045474dcd51612e50597b8406a55d9dc863 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90057 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-26WIN prevent deadlock in SetForegroundWindowJan-Marek Glogowski
As mentioned in various blogs, like Raymon Chens "The old new thing", 2008-08-01, "I warned you: The dangers of attaching input queues", using AttachThreadInput to steal the input from an other thread, so SetForegroundWindow becomes more reliable, can deadlock in that call in win32u.dll!NtUserCallHwndLock. Stackoverflow also has a multitude of suggestions and links in "Win32 SetForegroundWindow unreliable", to circumvent Windows focus-stealing prevention mechanisms. A customer is experiencing these hangs reliably and often when opening LO windows via Java UNO, because the Window and the UNO thread are different and trigger this code path. Removing the calls to AttachThreadInput fixes the problem for them. This has started lately and nobody really knows why. I also know other customers with a similar Java UNO setup, which don't experience them. For better foreground handling, the calling app eventually should either use AllowSetForegroundWindow or CoAllowSetForegroundWindow (for COM servers), to give up the foreground / input handling. So this just drops the AttachThreadInput calls. Change-Id: I8de0a17aaaa44c24b1ee728b2ef6ec3aea951c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89527 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-11tdf#130478 add direct dash paint in GDIPlus (win)Armin Le Grand (Collabora)
Not as easy as hoped, see more info in the adapted file vcl\win\gdi\gdiimpl.cxx itself. Change-Id: I265888c65658d5e8a2a04b6f064d2baf3e1d9bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88463 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-10cid#1458168 silence bogus Dereference after null checkCaolán McNamara
and cid#1458166 Dereference after null check cid#1458167 Dereference after null check Change-Id: I68dc7dc1bc78ed64795d353d5d0ffc15cc46b0c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88347 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-09Fix typoAndrea Gelmini
Change-Id: I931ac89553f5025d7729274c9e00a095ae65e7cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88325 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-08Fix typoAndrea Gelmini
Change-Id: I99333fab507d9a7dc7583bfab20388afffd3ec20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88249 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-07tdf#130478 Enhance Dashed line drawing on all systemsArmin Le Grand (Collabora)
For more info and explanation including state of process information and discussion(s) see task please. Adding corrections for gerrit build Change-Id: Ie10fb8093a86459dee80db5ab4355b47e46c1f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88130 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-03Avoid loplugin:unsignedcompare (clang-cl)Stephan Bergmann
Change-Id: I95f348cc8b69b6c865ad0038b9ee0017def01e43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87896 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03loplugin:makeshared (clang-cl)Stephan Bergmann
Change-Id: I0c786bf401e514f9d86e33d8ab6366fc5dd1f425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03Silence -Werror,-Wunused-variable (clang-cl)Stephan Bergmann
Change-Id: Icbf3b6f8f1259e7e50f64e2885b1604f1a98f485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87894 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03loplugin:unsignedcompare (clang-cl)Stephan Bergmann
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-14tdf#128226: make OpenSymbol font an internal resourceMike Kaganski
OpenSymbol is crucial for Math; so it is not just some font that could be used if present, but part of program resources. As such, it must be available with other program resources, and not depend on user preferences, like uninstallation of the font from system. This patch puts it into program/resource/common/fonts, and adds that path to the paths used for private fonts. This is in addition to share/fonts/truetype, which is optional, and is usually absent on most Linux and Windows installations (on Linux, it is usually in a separate package installing it to system fonts; on Windows, it is also installed to system by MSI). Change-Id: Ibf5e12e70dacb62b965035645fc53e9d83cd8793 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86649 Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Rene Engelhard <rene@debian.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-01-09add setting to config_skia.h whether to use 32bpp bitmapsLuboš Luňák
As said in previous Skia commits about BackendCapabilities::mbSupportsBitmap32 this should be preferrably enabled, but there are still parts of LO code that have a problem with it, so make it easier to enable/disable this. Change-Id: Iae7a8d5fc77a27372c00f6745317d168e8b2a05b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86489 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-06set BackendCapabilities::mbSupportsBitmap32 for Skia againLuboš Luňák
This got reverted in 84f84f59ce7c83a99e4e340071d58b6557dbe91a, but using 24bpp bitmaps means SkiaSalBitmap::GetAsSkBitmap() does a needless 24bpp->32bpp conversion, and this whole rgb/a separation is kind of lame ancient cruft that it'd be better to get rid of, so enable this again to find all the code that can't handle 32bpp bitmaps properly, so that they can be fixed. Change-Id: I9bbd8ff94a4ad680cb42dee649e371c5716a9d20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85545 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-12-24sal_Char->char in vclNoel Grandin
Change-Id: I4359b7042f98586e2c9f5529d83d769cdf3d033c Reviewed-on: https://gerrit.libreoffice.org/85775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-11lok: Support per-view help dataTamás Zolnai
Used for showing tooltip windows in LO online. Change-Id: I8b6a7272c75025e717923c839fa8fd9f4cab2903 Reviewed-on: https://gerrit.libreoffice.org/84717 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84803 Tested-by: Jenkins
2019-12-10loplugin:unusedmember (clang-cl)Stephan Bergmann
ColorScanlineConverter::meDestinationFormat was unused ever since the code was introduced in 6b571ae4608ac15256eb7582f442ce69975370f3 "opengl: change from BGRA to RGBA color arrangement on Windows". Change-Id: Ieb530e291270d97613176250f126c223aee8faa9 Reviewed-on: https://gerrit.libreoffice.org/84863 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2019-12-06keep just one shared reference to Skia shared GrContextLuboš Luňák
This should make it easier to keep the reference without having to keep references all over the place, especially when the shared GrContext starts to be used also for GPU-backed surfaces elsewhere. Change-Id: Icf3f6eb849ebc5eb63b1836f9caeb6f5e5e58ca6 Reviewed-on: https://gerrit.libreoffice.org/84560 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-12-06make Skia Windows text rendering use SkImage instead of SkBitmapLuboš Luňák
This will allow making it GPU-backed, as SkImage can be GPU-backed, SkBitmap cannot. Change-Id: I047eefe83741a036d372d39e5fc6a4fa400e6504 Reviewed-on: https://gerrit.libreoffice.org/84559 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-12-05loplugin:redundantpointerops (clang-cl)Stephan Bergmann
Change-Id: Ibba507b6c2986a529ae75ad84781825f161f2be5 Reviewed-on: https://gerrit.libreoffice.org/84511 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-05loplugin:external (clang-cl)Stephan Bergmann
...plus loplugin:consttobool and loplugin:fakebool fallout Change-Id: Ie3d8121815c080b13bea6d9deca1eb138ca56138 Reviewed-on: https://gerrit.libreoffice.org/84515 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01boost::optional: replace uses of get_value_or with value_orStephan Bergmann
...in preparation for wholesale replacement of boost::optional with o3tl::optional, which will be an alias for either std::optional or boost::optional, and std::optional only has value_or. boost::optional::value_or was added with <https://github.com/boostorg/optional/ commit/3984c9f9a157ef116cea69bc8bb20f433320eb61> "Added function value_or()", which according to git-describe first appeared in tag boost-1.56.0. We appear to have no strict Boost baseline (the closest we get is with > [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)] in configure.ac), and at least CentOS 7 TDF machine tb76 only has boost-devel-1.53.0-27.el7.x86_64. However, any environment using Xcode < 10 that needs to make o3tl::optional fall back to boost::optional should use --without-system-boost, and external/boost is currently at 1.69.0, so should be safe. ATTENTION: In isolation, this commit will break in any environment that uses Boost older than 1.56.0. It requires the following commit introducing o3tl::optional. (But doing these changes in individual commits was deemed more valuable than supporting a hypothetical future git-bisect against an old Boost.) Change-Id: Ib31affa3eebf0d0029d8620dc6abb7a60f6c7629 Reviewed-on: https://gerrit.libreoffice.org/84127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-27Removed duplicated includeAndrea Gelmini
Change-Id: Ibf3142a88def08fd9b531b39bde5643aa8498f7f Reviewed-on: https://gerrit.libreoffice.org/83908 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-27revert BackendCapabilities::mbSupportsBitmap32 for SkiaLuboš Luňák
It appears that there are still some paths that do not expect bitmaps to be truly 32bit, so better revert to the old safe (and poor, complicated and inefficient) way of pretty much ignoring the alpha channel in SkiaSalBitmap, and let BitmapEx handle it by using an extra alpha bitmap. Change-Id: I4318c05f4ceafc5de48e19eeae5efe2abed2ec69
2019-11-27extend vcl backendtest to more backendsLuboš Luňák
At least the KF5/Qt5 VCL plugins passes fine. Change-Id: I033ddf6ae9cc663729ca459cdc514dc0fa51ddc2
2019-11-27implement Skia native controls drawing/caching for WindowsLuboš Luňák
This actually fixes a number of drawing problems (e.g. highlight in popup menus), it seems the other code path is buggy. Change-Id: Iea697f577d08d20e338224d5ff5b3bf7b653f8d1
2019-11-27fix Skia Windows text renderingLuboš Luňák
There are two cases in WinSalGraphics::DrawTextLayout(), with and without cached glyphs: - Cached case DeferredTextDraw() gets data as BGRA with the glyph drawn in white, it just needs to be modulated to the proper color and drawn. - Uncached case DrawTextMask() gets data as BGRA with A invalid, it must be used as mask for the color to drawn, but without the inverse alpha VCL idiosyncracy that DrawMask() handles. Change-Id: I05dcec994df68d5986cd85cffa42a8f9f23c42c4
2019-11-27skip text drawing if there is nothing to drawLuboš Luňák
If the rectangle is empty, there is nothing to draw. This also avoids problems with WinSalVirtualDevice::ImplCreateVirDevBitmap() calling CreateDIBSection() with zero dimensions. Change-Id: I3a56e64fc32cfb855443f4ab665d53604d724d9b
2019-11-27reimplement supportsOperation() for Skia and OpenGLLuboš Luňák
The shared X11 implementation depends on XRender, which doesn't make any sense. Change-Id: I82f36e0835a993a8b226af211d8635336960d7ec
2019-11-27implement pruning in SkiaGlobalWinGlyphCacheLuboš Luňák
Currently based on identifying the SkBitmap's by their getPixels(), but this may need changed later since it's probably going to be more performant to use SkSurface. Also move the cache pruning out of AllocateTexture(), as that may possibly remove elements that would be used by DrawCachedGlyphs(). Change-Id: Ide2de752f634593b97573667af49b7aa9ec1f47f
2019-11-27basic implementation of Skia text drawing on WindowsLuboš Luňák
Change-Id: If66e92aef04cd5bbeb22b8c5da65b7b9c77fed23
2019-11-27use SupportsBitmap32 also for Skia on WindowsLuboš Luňák
Change-Id: Ic40b76f152767d25c3645de2cb013c3af4ae93a4
2019-11-27refactor Windows OpenGLGlyphCache stuff to be reusable for SkiaLuboš Luňák
Basically just remove 'OpenGL' from names of most of the classes, turn them into base classes that have OpenGL subclasses that actually implement the functionality. Change-Id: Idf1f347cebc2a417bda37d6955201c775ecb0890