summaryrefslogtreecommitdiff
path: root/vcl/headless
AgeCommit message (Collapse)AuthorFilesLines
2024-05-10loplugin:ostr in vclNoel Grandin2-3/+3
Change-Id: I5b6ee5bda0c5ff69d297f7f8e87d4c3f3d21791c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167470 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-17ofz#66825 Out-of-memoryCaolán McNamara1-5/+8
Change-Id: Ic3ce086dc6ba3f85824ec1e68d7501f278f758ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-16ofz#67408 Build failureCaolán McNamara1-3/+1
use of undeclared identifier 'SVP_CAIRO_ALPHA Change-Id: I546d2d203929702e46bd6de6242d70c21b636885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164931 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13tdf#146619 Remove unused #includes from C/C++ filesRafał Dobrakowski11-39/+9
the 'vcl' module was cleaned. Change-Id: I3bc7470d08bd5eae46344975293a1f6ae30b30f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164637 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-02-29vcl: separate scanline direction from ScanlineFormatTomaž Vajngerl3-22/+18
ScanlineFormat enum is used to indicate 2 things - scanline format type and scanline direction (TopDown or BottomUp). This makes it complex to manipulate with (using bit arithmetics) and hard to use in general for no benefit, so this commit separates direction out from the ScanlineFormat into ScanlineDirection enum. ScanlineFormat is now just a simple enum class (not a bit field). Change-Id: Iad55d0a4c8c07b71221c2facf7cf6a2d518fec0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163943 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-19hide more symbolsNoel Grandin1-3/+3
using the bin/find-can-be-private-symbols.py script to find classes with large numbers of exported symbols that can hidden. before exported = 58104 imported = 30810 unused_exports = 35433 after exported = 55094 imported = 31073 unused_exports = 32423 Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-30move IsFuzzing to comphelperCaolán McNamara1-3/+3
and try something a bit more generic Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-02pass BitmapBuffer around by std::optionalNoel Grandin3-43/+34
instead of allocating on the heap, it is small Change-Id: I79eec6605a04c09d9a984cd1a719affb5b06dff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-29remove fallback codeNoel Grandin1-12/+1
we have had this assert for long enough now to flush out any problems. Change-Id: Ib732ca8d9156feb3c5d071cdbd44ea97875f6d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (vcl)Julien Nabet2-4/+4
Change-Id: Ie9bb9ce20f27162bcb7d7d25dcad99107675e2be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159709 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-29vcl: no raw pointersThorsten Behrens1-11/+3
For ImplJobSetup. Also, check memcmp mem size more properly Change-Id: Idcf20bf1b51bc2508f3d37e018efd18e591a6099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/26648 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-22SvpGraphicsBackend::getBitmap overwrites the bufferCaolán McNamara2-4/+12
so in this case we don't need to memset it to 0 before seen in VclDrawingArea::DumpAsPropertyTree Change-Id: I339677f091e9e6585e5d6e72f467d439efb43cb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-04Fix typoAndrea Gelmini1-1/+1
Change-Id: I9363004f30c6b49da7911ddf1e4bad468d7aa8b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157555 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-03optimize DrawRect if we fill but no line colorCaolán McNamara1-2/+13
because that's the same as if we had line color the same as fill color Change-Id: I540b31c0dcd07dfddbbd9f8cf396f7df3a4edb4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157498 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-02tdf#157164 Vertical Position preview does not show red line for baselineNoel Grandin1-5/+10
regression from commit f510ea2d7962a4325055c6380a0032331b4e87cf Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Jan 12 11:49:35 2022 +0200 don't bother trying to draw stuff which is effectively invisible Change-Id: Idc947163521ebfb65b27204fb5c65b1f59fe6de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157481 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-23tdf#146619 Remove unused includes from vcl/incGabor Kelemen1-0/+1
Change-Id: I8fbe02547d5045cfdb5021720b10ddd10106209a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin2-6/+6
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-31all drawPolyPolygon variants return true nowCaolán McNamara2-9/+6
since: commit 4998de76ed1da4039e30718941d50d6f1dfe4f82 Date: Sun Jul 30 07:40:48 2023 +0000 tdf#156230: Drop freshly unused GenPspGfxBackend Change-Id: I7fc2a068f807777ed392c5d58772d130bf7f51c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155076 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-31supportsOperation OutDevSupportType::B2DDraw is always true nowCaolán McNamara1-1/+0
since: commit 4998de76ed1da4039e30718941d50d6f1dfe4f82 Date: Sun Jul 30 07:40:48 2023 +0000 tdf#156230: Drop freshly unused GenPspGfxBackend Change-Id: I1adc30a60aec0c5aab9289e9c0505d1dbad10631 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-30tdf#156230: Use SvpGraphicsBackend in GenPspGraphicsKhaled Hosny1-1/+0
We no longer draw to PostScript, so old backend is unneeded. Change-Id: I069ce735b303721be7de6abf69aa26c1b25a9107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155063 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin2-28/+1
(Second attempt at landing this) Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Add a couple of new Color constants to make the intention of the vcl code clearer. Notes (*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask to more accurately reflect the requirements of the CGImageCreateWithMask function seems to fix some tests. (*) The vcl code does not properly support gradients with transparency. So the previous code was wrong, and this change is going to result in slightly different wrongness. Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-03Rename and move header next to other font headersKhaled Hosny1-1/+1
Change-Id: I5485817b5a6c2e9538ed6fb00893663d09e7fa26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153869 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-03Rename ImplFontMetricData -> FontMetricDataKhaled Hosny1-1/+1
Change-Id: I0f8753a5ef1865f4ea0431125e74d0f52aa1c396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153868 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-27add an --enable-cairo-rgba to set the order of pixels for internal cairoCaolán McNamara1-1/+1
Change-Id: Ieab2ef59f63a7722bffea3273d2eeefadef47b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153628 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-09Related: CollaboraOnline#6511 cairo backend can do transparent textCaolán McNamara1-0/+1
and avoid the extra work required here for the generic case. keep the transparency helper for the other backends, or any case where we may be recording to metafile, or pdf export etc Change-Id: Ic01b8b69f2d59e585605ce1e981298fda9185824 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152719 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-05-18tdf#63130 reduce duplicated work when pixel snappingNoel Grandin1-16/+29
Cache the calculations so we don't repeat work unnecessarily. Shaves 5% off load time. Change-Id: Iffbdd08768fea5b25ac83926b812067f52cba3a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151883 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-11ofz#58818 Direct-leakCaolán McNamara1-0/+15
Change-Id: I8974b998397aa521c9ee61651b5ce45d4189b303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151662 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-21MCGR: Reduce diverse GradientStyle enums to single UNO API oneArmin Le Grand (allotropia)1-3/+3
Change-Id: Ie0cd26a308a75ddead9451c53e874a39cc6eeb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150705 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-01-20ofz#54895 Out-of-memoryCaolán McNamara1-0/+1
Change-Id: I2faf68d8ed56e7d2b44bc7cae953716ea6dd7172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145878 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12move drawTransformedBitmap to CairoCommon and reuse for X11CairoSalGraphicsImplCaolán McNamara2-71/+80
Change-Id: I9b03d2ec973e2dab28358d7e8041b9d26705e700 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145352 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12remove newly unused X11SalGraphicsImplCaolán McNamara1-1/+2
Change-Id: I91d5c75f38a6798e6c4a3ce10d21fede558d27db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145337 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12merge duplicate CairoTextRender implsCaolán McNamara2-35/+1
drop getSurfaceOffset because both impls just set these to 0, so its a no opt Change-Id: Ie4f28d57fb8a170c7a46d3cafceef3e049c26e2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-12drop internal support for 1-bit imagesNoel Grandin3-44/+19
on modern hardware, these are less efficient than regular alpha channels. Also, this greatly simplies the range of stuff that vcl needs to deal with, which will make the upcoming transparency->alpha patch easier to deal with. Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit image. Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11use SvpSalBitmap for X11/gen alsoCaolán McNamara2-203/+228
and move bitmap draw/get into CairoCommon and reuse from X11CairoSalGraphicsImpl Change-Id: Ic1faf85b78a298e603279e6d318bab9240d67e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145288 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-11consider only CAIRO_CONTENT_ALPHA to be 1bitCaolán McNamara1-1/+1
Change-Id: I0d09207c8131297e9c95c4e146ae62d5dac77be3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145287 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-11move GetBitCount into CairoCommonCaolán McNamara2-6/+8
Change-Id: I1afc900ec10a9a8f5db29400666fcc78d7bc8f48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145286 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-10move invert into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-11/+22
Change-Id: I4fb52ed1a9d6d9405a76f5d06ca0770bf9b750e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145256 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-10reuse ROP and XOR solutionsCaolán McNamara2-26/+41
Change-Id: I52ba669921a4145f02c69ff90e0d8668c4698ad5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145255 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-10cairo_surface_map_to_image giving poor results under genCaolán McNamara1-2/+27
for some unknown reason Change-Id: I6a44b739b7126465e9cf54e31ad4b362badea85d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145254 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-10reorg to share more code more simplyCaolán McNamara2-228/+143
Change-Id: If598a94397a2a04ecd4121d7a532c81ef66b5d45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145253 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-07move drawRect into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-73/+55
Change-Id: I1d9f1dc96788530eb6a226a53a67764918348100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145139 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06move drawPolygon into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-5/+21
Change-Id: Ifb7514a72f7bc3a65f7f1ad51707405b1a2bd127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145137 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06move drawPolyLine into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-9/+21
Change-Id: I141b12c99825c67e4698d53633a1fa720cc487be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145136 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06use std::optional for SALCOLOR_NONENoel Grandin2-55/+59
instead of re-using an actual real color value, because it will totally not work when I convert vcl to use alpha instead of transparency Change-Id: I01f043e0b65ffd852989dfe28f2b9d5a43c9c3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-06move drawPolyPolygon into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-77/+113
Change-Id: I8eee16f10f4241ced467e2bf73e518d066f9508d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145111 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06adjust bodge to be only for CAIRO_CONTENT_ALPHACaolán McNamara1-1/+1
rather than specifically !CAIRO_CONTENT_COLOR_ALPHA Change-Id: I2b86feb8499b98e750e954c4b246d4c8bc3ef7cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145110 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06move getPixel into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-29/+34
2nd attempt. This reverts commit 8d0b7bdb8c9ae8254e5b77b533a158734affc4f5. Change-Id: I8901a1258e0b0d89170f4e056516c5211801456a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145109 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-06Revert "move getPixel into CairoCommon and reuse from X11CairoSalGraphicsImpl"Caolán McNamara2-34/+29
This reverts commit 00b62877fa2f900d1c2dcf7b721f7a956408f8a0. XIOError seen with vcldemo Change-Id: Id75497f8148964372beaed9432ee6097ec8afc47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145076 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-05move getPixel into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-29/+34
Change-Id: I5401cc87ec228d52d98fc65840f875cfb55e30c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145052 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-05move drawPixel into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara2-8/+17
Change-Id: I0638403ab54039793e851583937b09674f05c36d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145051 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>