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 --- svx/source/unodraw/unoshape.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'svx/source/unodraw') diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 86b3d875d64a..94a7b2540ec6 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -80,6 +80,7 @@ #include #include #include +#include #include #include @@ -748,8 +749,8 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const } const BitmapEx aBmp( - convertPrimitive2DSequenceToBitmapEx( - xPrimitives, + drawinglayer::convertPrimitive2DContainerToBitmapEx( + std::move(xPrimitives), aRange)); Graphic aGraph(aBmp); -- cgit