diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-09 13:00:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-09 15:22:52 +0200 |
commit | 8104d771b10a5c8b15eae4b67aa112ae2ef77b5b (patch) | |
tree | 095a091a90104689a1d6d53ed7060feb0973c1ea /svx/source/engine3d/view3d.cxx | |
parent | ca512f301faf42b7d23675ca251b20e0ad67db1b (diff) |
tdf#144052 reduce Primitive2D copying
when creating charts, by using a
Primitive2DContainer&&
parameter in the GroupPrimitive2D constructor, which forces the call
sites to pass a temporary, and at most call sites, we can std::move in
an existing local variable.
Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/engine3d/view3d.cxx')
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 195f09c9a3b5..33f1162cb3f9 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -166,13 +166,13 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr if(!aMatrixTransform.isIdentity()) { // embed in transformation group - drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, aContent)); + drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(new drawinglayer::primitive2d::TransformPrimitive2D(aMatrixTransform, std::move(aContent))); aContent = drawinglayer::primitive2d::Primitive2DContainer { aTransformPrimitive2D }; } // if we have full overlay from selected objects, embed with 50% transparence, the // transformation is added to the OverlayPrimitive2DSequenceObject - drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aContent, 0.5)); + drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparencePrimitive2D(new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aContent), 0.5)); aContent = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparencePrimitive2D }; std::unique_ptr<sdr::overlay::OverlayPrimitive2DSequenceObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(aContent)); |