diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-07 18:53:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-23 11:45:33 +0100 |
commit | e3bd776e020723ad8caf0a02d8db0d19e0f0e650 (patch) | |
tree | 8ed999eb97278d2cb7954695f03d0bc3652ee6b0 /drawinglayer/source/tools/primitive2dxmldump.cxx | |
parent | be596c0192f059324d06716b625be6a11079f8ea (diff) |
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<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>
Diffstat (limited to 'drawinglayer/source/tools/primitive2dxmldump.cxx')
-rw-r--r-- | drawinglayer/source/tools/primitive2dxmldump.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
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<const BasePrimitive2D*>(xPrimitive2DReference.get()); + const BasePrimitive2D* pBasePrimitive = rPrimitive2DSequence[i].get(); sal_uInt32 nId = pBasePrimitive->getPrimitive2DID(); if (nId < maFilter.size() && maFilter[nId]) continue; |