summaryrefslogtreecommitdiff
path: root/vcl/headless
AgeCommit message (Collapse)Author
2023-04-21MCGR: Reduce diverse GradientStyle enums to single UNO API oneArmin Le Grand (allotropia)
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 Grandin
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 Grandin
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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 McNamara
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>
2023-01-05move drawLine into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara
Change-Id: I6c667b4aa64c49ad18b7e9a2cd6cc43228369bd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145050 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-05move hasFastDrawTransformedBitmap into CairoCommon and reuseCaolán McNamara
Change-Id: I5c70f657fe885da54caf9514bdddf868e9cf8c1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145029 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-05move drawAlphaRect into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara
Change-Id: Ic9155117dd8586db5738cd7a620818af8bb28f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145028 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-05move drawGradient into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara
Change-Id: I249afbc4cf6318fd9ed42fef0a2aa71d1a76d9ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145024 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04move implDrawGradient into CairoCommon and reuse from X11CairoSalGraphicsImplCaolán McNamara
Change-Id: I341e0b1e3cccd18193c3f9798b875a709fe4871f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144975 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04move supportsOperation to CairoCommonCaolán McNamara
Change-Id: I754080c322ec76ec8e218f8c97b1649eaf922c74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04sync drawPolyLine impls early returnsCaolán McNamara
Change-Id: I9b7c49d0e4286245979043e1cb21f8b577676f87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144972 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04make applyColor staticCaolán McNamara
Change-Id: I69cdc922488351d8bd7c0facf9c7209f56f24291 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145027 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-02Use std synchronisation APIs instead of a pipeTor Lillqvist
The immediate reason for this is that pipes are broken in the Emscripten runtime, see https://github.com/emscripten-core/emscripten/issues/13214. But if we can drop the use of a pipe for other platforms, too, why not. Without this, when attemting to run Collabora Online as WASM, I get: Aborted(Assertion failed: nRet == 1, at: .../vcl/headless/svpinst.cxx,538,DoYield) It is quite possible that the code could be simplified drastically. I only replaced the use of a pipe with hopefully equivalent use of a queue, a condition variable, and a mutex. Change-Id: I9259ba36afeabce6474a1aec827d01bcbbd4412b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144944 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2022-12-23can improve scopeCaolán McNamara
Change-Id: Ied189c410b21272b5fad47c3d4b11e85a534cc38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144773 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-21initial Experimental System-Dependent PrimitiveRenderer for CairoCaolán McNamara
just some partial pieces export TEST_SYSTEM_PRIMITIVE_RENDERER=1 and the simple drawing shapes work Change-Id: I3e01501a1cb21ec86d6fe8f5637a23e7358ffc86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144632 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-21No need for bool return value hereNoel Grandin
all of the implementations of this method return true. Change-Id: I6dc02499af1809110edd482a48d9f6d5d42ead19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-28ofz#53820 Direct-leakCaolán McNamara
cairo_get_source leaks if cairo is in an error state Change-Id: I1ddcf801d5a3fc0944f14001cbc7d152b2071c89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143364 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-27cid#1517054 Logically dead codeCaolán McNamara
Change-Id: I0ea48d79d32920cf5f5ab2b11a5b4f53ddae0dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22ofz#53586 Out-of-memoryCaolán McNamara
Change-Id: I4442f6b6cd010706ccfded454e4c56b4ff001dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143077 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-17ofz#53434 Out-of-memoryCaolán McNamara
Change-Id: Ia148869905cb54f57136fe0e0c2572434a7d37cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142816 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-14bump required cairo version to 1.12.0Noel Grandin
Change-Id: I7fbfb21f2facdd6371fba821fd30e625115dc72d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-14use cairo_surface_map_to_image if availableNoel Grandin
which is considerably faster than emulating it Change-Id: I9159072caf3142684f8489d291fa0438dce2e4b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142702 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-14cairo_fill is cheaper than cairo_paintNoel Grandin
when we are only interested in copying a small chunk of the image. Shaves 25% off the cost of rendering here Change-Id: I3df726a08fad3ab3c330da74d09ee5e735e1bc60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-14split CairoCommon XOR code into its own methodNoel Grandin
Change-Id: If615f08a44a083d53c75f58af3578e59634f9a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-11ofz#53196 Out-of-memoryCaolán McNamara
Change-Id: I8cb6df1f109a1c10fb025b8ecd229487b73e900d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142578 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-06ofz#52723 Out-of-memoryCaolán McNamara
Change-Id: Id563d2d7629c88d443360ec6a1086b1079f7f48b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-04ofz#53034 Null-dereferenceCaolán McNamara
Change-Id: I3be4f2b976b64a2f592eeef9802e6cf8dd15341b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142278 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-22ofz#52514 OOMCaolán McNamara
Change-Id: Id4f3b3cef27a299e5496276e274406d0720a27fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-18Move access to SystemDependentDataHolder to Bitmap (2)Armin Le Grand (allotropia)
I was too positive thinking that SalBitmap would be fine, but it's locked to vcl. To be able to add system-dependent BitmapBuffering I move the access to Bitmap now. This is no functional change, but offers the same access as e.g. B2DPolygon/B2DPolyPolygon offer already. Also cleaned up usage/access to SystemDependentDataManager which removes quite some code in constructors and makes things easier in general. Change-Id: I2baa40a12479fab0fe66063a018f058c6b8f5597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141507 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-10-17Move access to SystemDependentDataHolder to SalBitmapArmin Le Grand (allotropia)
To be able to buffer BitmapData which is created based on Bitmap class data, move the access to basegfx::SystemDependentDataHolder from classes where it was used until now (WinSalBitmap and SvpSalBitmap) up to SalBitmap which is accessible outside vcl. This is a reorder plus a virtual access method to detect/access that helper layer, no functional change. It will be needed for system-dependent renderers when they want to use that standard buffering e.g. already used in the headless & windows backends. Change-Id: Ib30e7b98e722b977bb0c87ad253e3ffc1841e87e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141456 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-10-14ofz#52353 Out-of-memory with ultrathick linesCaolán McNamara
Change-Id: Id907795a0e8f7646462edd510dfbc62ad2c26617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141368 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>