From e3bd776e020723ad8caf0a02d8db0d19e0f0e650 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 7 Dec 2021 18:53:11 +0200 Subject: Split BasePrimitive2D UNO interface into separate object 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 Change-Id: I553eaa4c16ba016b098cb21f6c55f5008f0d9b53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126487 Tested-by: Noel Grandin Reviewed-by: Noel Grandin --- drawinglayer/source/tools/primitive2dxmldump.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drawinglayer/source/tools/primitive2dxmldump.cxx') diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx index 5f753039183c..5f303a627e0f 100644 --- a/drawinglayer/source/tools/primitive2dxmldump.cxx +++ b/drawinglayer/source/tools/primitive2dxmldump.cxx @@ -605,10 +605,7 @@ void Primitive2dXmlDump::decomposeAndWrite( { for (size_t i = 0; i < rPrimitive2DSequence.size(); i++) { - drawinglayer::primitive2d::Primitive2DReference xPrimitive2DReference - = rPrimitive2DSequence[i]; - const BasePrimitive2D* pBasePrimitive - = static_cast(xPrimitive2DReference.get()); + const BasePrimitive2D* pBasePrimitive = rPrimitive2DSequence[i].get(); sal_uInt32 nId = pBasePrimitive->getPrimitive2DID(); if (nId < maFilter.size() && maFilter[nId]) continue; -- cgit v1.2.3