summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
0 files changed, 0 insertions, 0 deletions
already added animation, but that was a compromize. Done that now in the correct way, so that animation is possible and can be directly rendered using a FillGraphicPrimitive2D if wanted, including one extra layer of alpha, too. This will also enhance other primitive processors, but of course most those that do handle that now directly, so CairoPixelProcessor2D does that. Note that it does not need to support animation in any way (that is part of the primitive stack), but just direct tiled rendering. Change-Id: I8860098dfb3f2369e361579cf1deea7c67b662b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170937 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> 2024-07-23CairoSDPR: Support alpha for BitmapPrimitivesArmin Le Grand (Collabora) To more directly support an additional alpha channel for BitmapPrimitive data I have done some deeper changes to the primitive stack, in a compatible way. Quite some more graphic types and primitives now support an additional direct alpha value. All that is decomposed/created/broken down in a way that needs no changes for existing renderers, in already described ways. The CairoPixelProcessor2D already uses this in the processFillGraphicPrimitive2D implementation and thus in the FillGraphicPrimitive2D. This works since primitive productions now all try to create that FillGraphicPrimitive2D type including an additional alpha value - if possible and necessary. Change-Id: Ib1b16491a2b3aee16f14cc8196e28af30a7cf9be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170900 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins 2024-07-17fix skia crash (tdf#160646 related)Noel Grandin while testing the document attached to this bug I get a repeatable skia crash (only skia is in native mode, not software rendering). This reveals that there a couple of data structures that need to be cleaned up while holding the SolarMutex. Change-Id: I3ff460a4febf1ffcb27ad904224e1594ead4aa3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170612 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2024-07-16tdf#158397 freeze hovering mouse above animating gifNoel Grandin Improve the hit-test machinery so we don't need to rerender the graphic when moving the mouse over it Change-Id: Ide088296aa9c2be1348b8908194f47378454ae40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170587 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins 2024-07-10CairoSDPR: Handle FillGraphicPrimitive2D betterArmin Le Grand (allotropia) Avoid decomposition of it in AnimatedExtractingProcessor2D by handling there directly. Goal is to find/extract animation primitives, so only do something when the contained Graphic is active Change-Id: I1d168428ddbaaac2c9d5fde7b26be380ba442c30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170203 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> 2024-03-27tdf#160084 Simplify comparison for basegfx::fToolsBogdan Buzea Change-Id: I853cab70d24e4813d979f507dc5b66049cbca53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2024-02-07these casts are no longer necessaryNoel Grandin Change-Id: Ife51f47d95e286e0fec165882377c31b1a664241 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2024-02-07simplify some Primitive2DContainer constructionNoel Grandin Change-Id: Iced31da6891a5d218d63e9b59d48fb2645f39203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-12-23Related: tdf#158807 mutex must be locked when disposing a VirtualDevicePatrick Luby If the following .ppt document is opened in a debug build and the document is left open for a minute or two without changing any content, this destructor will be called on a non-main thread with the mutex unlocked: https://bugs.documentfoundation.org/attachment.cgi?id=46801 This hits an assert in VirtualDevice::ReleaseGraphics() so explicitly lock the mutex and explicitly dispose and clear the VirtualDevice instances variables. Change-Id: I5d371a4e99fca4aae2b6edc8b53eca10cb143aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161243 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@libreoffice.org> 2023-12-14cid#1545734 COPY_INSTEAD_OF_MOVECaolán McNamara and cid#1545723 COPY_INSTEAD_OF_MOVE cid#1545708 COPY_INSTEAD_OF_MOVE cid#1545705 COPY_INSTEAD_OF_MOVE cid#1545684 COPY_INSTEAD_OF_MOVE cid#1545674 COPY_INSTEAD_OF_MOVE cid#1545673 COPY_INSTEAD_OF_MOVE cid#1545667 COPY_INSTEAD_OF_MOVE cid#1545661 COPY_INSTEAD_OF_MOVE cid#1545660 COPY_INSTEAD_OF_MOVE cid#1545657 COPY_INSTEAD_OF_MOVE cid#1545653 COPY_INSTEAD_OF_MOVE cid#1545636 COPY_INSTEAD_OF_MOVE cid#1545624 COPY_INSTEAD_OF_MOVE cid#1546124 COPY_INSTEAD_OF_MOVE Change-Id: I7d50594e046a022147d9ddf077b8b2d8027f9bca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> 2023-12-06make AlphaMask separate from BitmapNoel Grandin Having it subclass Bitmap encourages confusion in passing it around, and I need the extra type-safety for my work on merged-alpha Change-Id: I35819f9b8ee609cbdaf865563c78531e397b529b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160235 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-08-13Related tdf#156630 and tdf#156629 force snapshot of alpha maskPatrick Luby On macOS, with Skia/Metal or Skia/Raster with a Retina display (i.e. 2.0 window scale), the alpha mask gets upscaled in certain cases. This bug appears to be caused by pending scaling of an existing SkImage in the bitmap parameter. So, force the SkiaSalBitmap to handle its pending scaling. This change consolidates the three duplicate fixes added in the following commits into the AlphaMask(const Bitmap&) constructor. commit 12fd870113a663dde5ceb38c61f1986a34095d0e commit ce2d9f5dd4b6a26847c4779bce4866d969ff4400 From my light testing, the bitmap's SkImage is not scaled except when running macOS with a Retina display. The only exception is that this fix will be triggered on all platforms when exporting to PDF images with an alpha mask. Change-Id: Iea5afd55aac984ca606b2b4b44e457d81d76fac0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155568 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> 2023-08-10tdf#156630 eliminate opaque parts when drawing animated PNG imagesPatrick Luby Due to the switch from transparency to alpha in commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, flip the background colors for the VirtualDevices and invert an alpha mask. On macOS, with Skia/Raster with a Retina display (i.e. 2.0 window scale), the alpha mask gets upscaled. Also, when Skia is enabled, the alpha mask gets inverted in the first export to PDF after launching the application. These two bugs appear to be caused by asynchronous rendering of the returned bitmap. So, we force a copy of the alpha mask in case it changes before the bitmap is actually drawn. Lastly, respect system animation settings when determining if the image should be animated. Change-Id: I8144691a6c99bf8361b301b88d22172991463f26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155429 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> 2023-06-29tdf#104877 Implement APNG blending modesParis Oplopoios Change-Id: Ib7ce4d113ccaa4843b8332087ebe52ac3828180e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153556 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2023-05-07use AlphaMask for variables when calling GetAlphaMaskNoel Grandin Right now this doesn't make any difference, since Bitmap is the superclass of AlphaMask. But when I switch to using alpha instead of transparency, passing AlphaMask around is going to mean something different to passing plain Bitmap around. Change-Id: Ic1541e5f0a3b97331793cd23e23115faa7f382b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-01-11rename BitmapEx::GetAlpha to GetAlphaMaskNoel Grandin to ease the reading of code related to an upcoming patch to convert transparency to alpha, since there is already a GetAlpha in Color. Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-11-16Use BitmapEx in BitmapPrimitive2DNoel Grandin we no longer need to wrap it in the framework XBitmap implemenation Change-Id: I0dc56ad63364e2c5a4cedd5e70d4ae7ea7eae563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-09-16vcl: AnimationBitmap -> AnimationFrameChris Sherlock The emphasis is not quite right. An animation is made up a sequence of *frames*, not bitmaps. A frame includes such things as position, size, timeout till the next frame *as well as* a bitmap. Note: had to regenerate a bunch of precompiled headers Change-Id: Ib1959452653857555f41e01ac0151d08c41a3b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76460 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> 2022-06-15clang-tidy modernize-pass-by-value in drawinglayerNoel Grandin Change-Id: I8a3245c6a4d687edbc95cf28b2932d80c86a7b65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-05-30use more Primitive2DContainer::append and more std::moveNoel Grandin Change-Id: Ide40a08f70cbb30a4f18c496d986feb78e5dfa1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-05-29use std::vector in AnimatedGraphicPrimitive2DNoel Grandin instead of Primitive2DContainer, because I want to change Primitive2DContainer into a different data structure that does not support cheap random access Change-Id: I1bc55f2e21d9d5c4529c87be57a46aee63e04589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135087 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-12-23Split BasePrimitive2D UNO interface into separate objectNoel Grandin Rather than make all the BasePrimitive2D classes bear the cost of being an UNO object, we just wrap the top level BasePrimitive2D in this class when we need to pass them over UNO. This reduces the locking overhead when doing normal drawinglayer operations, and reduces the size of drawinglayer objects and the cost of initialising them, which shaves 5% off the load/display time of a large barchart. Add new drawinglayer::convertPrimitive2DContainerToBitmapEx utility method to avoid needing to convert to Sequence<XPrimitive2D> Change-Id: I553eaa4c16ba016b098cb21f6c55f5008f0d9b53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126487 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-12-04rename Primitive2DDecompositionVisitor methodsNoel Grandin from "append" to "visit" The current naming comes from when I created this class as replacement for passing Primitive2DContainer around and the naming was meant to reduce code churn. But now that I'm using it more, the naming is an impediment to understanding the code. Change-Id: I4ee0156c7ffb534eac64f1c05eac6b8c67c25ab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-09-24reduce copying in drawinglayerNoel Grandin by passing PrimitiveContainer&& around. There are lots of place where we were preparing a local variable of type PrimitiveContainer, and then copying it someplace else, then throwing it away. Change-Id: Iacfd983640c9e55da25800ccc01734dfc8b4d64a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-09-09tdf#144052 reduce Primitive2D copyingNoel Grandin when creating charts, by using a Primitive2DContainer&& parameter in the GroupPrimitive2D constructor, which forces the call sites to pass a temporary, and at most call sites, we can std::move in an existing local variable. Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-08-31clang-tidy:readability-redundant-member-initNoel Grandin Change-Id: I95918275653714577e2d6728dd3947c7fbb66d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-04-29remove support for BITMASK in vcl backendsNoel Grandin Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-04-26drop mask from BitmapExNoel Grandin So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>