Make impBufferDevice faster again

Desktop / LibreOffice - Armin Le Grand (allotropia) [] - 19 September 2022 07:56 UTC

When the Primitives for the Glow-Effects were added (modified ShadowPrimitive2D, SoftEdgePrimitive2D and GlowPrimitive2D) a modified version of impBufferDevice was created and used. That lowered the speed for drawing objects with transparence by about factor 2.5 and was unfortunately not only done for these Primitives, but for transprent objects in general.

For the mentioned factor refer to: Patch to demonstrate former and now repaint differences

After having reworked those Primitives to use another mechanism and being decomposed so they will work in all now and future renderers, it is possible to go back to that easier and faster method to render Transparency.

For extended information, please take a look at the added comments, mainly in vclhelperbufferdevice.hxx

Identified a still bad behaviour when objects use a TransparenceGradient. Corrected that and added (at this opportunity) a method 'createAlphaMask' along with 'convertToBitmapEx' which is now used in the GlowPrimitive2D & ShadowPrimitive2D which only need the AlphaMask to do their job anyways (I had commented there that thjis is possible before). That will be faster for visualizing those Primitives.

Change-Id: Ieac880384de26960c2c4b8740a1dee1e15d7ac9e Reviewed-on:

7614859e5738 Make impBufferDevice faster again
.../source/primitive2d/glowprimitive2d.cxx | 24 ++-
.../source/primitive2d/shadowprimitive2d.cxx | 22 +--
.../source/processor2d/vclhelperbufferdevice.cxx | 218 ++++++++++++++++++---
.../source/processor2d/vclhelperbufferdevice.hxx | 75 ++++++-
drawinglayer/source/tools/converters.cxx | 127 ++++++++++--
include/drawinglayer/converters.hxx | 12 ++
solenv/clang-format/excludelist | 2 -
7 files changed, 395 insertions(+), 85 deletions(-)


  • Share