summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2025-03-13 18:37:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2025-03-17 07:15:15 +0100
commit8a17b7f0a679ebf21bcfb425186b205d996d129b (patch)
treeab0b3f405b3a14ba51496b1ffbe6ef7106784883 /drawinglayer/source/primitive2d/graphicprimitive2d.cxx
parentf382c1a267a93539f3c169530780889336d20b25 (diff)
tdf#131595 Improve drawinglayer flushing mechanism.
Which dramatically speeds up switching between sheets in the referenced document. The problem here is that we have a timer for each buffered primitive. And we have a lot of primitives here. And the TimerManager does not scale well to lots and lots of timer, because it uses a linked list. So this change modifies the flushing mechanism, trading off some precision for some speed. Change-Id: I66a744f06af9b08d4e9b797d11db8d22f4060789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source/primitive2d/graphicprimitive2d.cxx')
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 457bd64c95c6..0a5a5060b0cb 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -177,7 +177,7 @@ GraphicPrimitive2D::GraphicPrimitive2D(basegfx::B2DHomMatrix aTransform,
, maGraphicAttr(rGraphicAttr)
{
// activate callback to flush buffered decomposition content
- setCallbackSeconds(20);
+ activateFlushOnTimer();
}
GraphicPrimitive2D::GraphicPrimitive2D(basegfx::B2DHomMatrix aTransform,
@@ -186,7 +186,7 @@ GraphicPrimitive2D::GraphicPrimitive2D(basegfx::B2DHomMatrix aTransform,
, maGraphicObject(rGraphicObject)
{
// activate callback to flush buffered decomposition content
- setCallbackSeconds(20);
+ activateFlushOnTimer();
}
bool GraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const