diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-23 15:35:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-24 11:33:32 +0200 |
commit | c8d2fa176a15a7ae76d6a4b76aea5f108313c2ec (patch) | |
tree | 96cee630060986d6d2ab68b1ce2ca09a6a4fe922 /include | |
parent | e1600348e49e1538459a0374fd97cd3173d4a4b9 (diff) |
reduce copying in drawinglayer
by passing PrimitiveContainer&& around.
There are lots of place where we were preparing a local variable of type
PrimitiveContainer, and then copying it someplace else, then throwing it
away.
Change-Id: Iacfd983640c9e55da25800ccc01734dfc8b4d64a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
5 files changed, 5 insertions, 6 deletions
diff --git a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index e54c883b0945..6ee1475575c0 100644 --- a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -66,7 +66,7 @@ namespace drawinglayer::primitive2d const basegfx::B2DHomMatrix& rTransform, double fContentWidth, double fContentHeight, - const Primitive2DContainer& rPageContent); + Primitive2DContainer&& rPageContent); /// data read access const css::uno::Reference< css::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; } diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx index f9c183f41ad6..63a3e6d8d274 100644 --- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx @@ -64,7 +64,7 @@ namespace drawinglayer::primitive2d /// constructor PatternFillPrimitive2D( const basegfx::B2DPolyPolygon& rMask, - const Primitive2DContainer& rChildren, + Primitive2DContainer&& rChildren, const basegfx::B2DRange& rReferenceRange); /// data read access diff --git a/include/svx/sdr/animation/animationstate.hxx b/include/svx/sdr/animation/animationstate.hxx index 078cc6342801..92878897e072 100644 --- a/include/svx/sdr/animation/animationstate.hxx +++ b/include/svx/sdr/animation/animationstate.hxx @@ -42,7 +42,7 @@ namespace sdr::animation public: // basic constructor. - PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DContainer& rAnimatedPrimitives); + PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, drawinglayer::primitive2d::Primitive2DContainer&& rAnimatedPrimitives); // destructor virtual ~PrimitiveAnimation() override; diff --git a/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx index fd5a87ac6404..06e7428de191 100644 --- a/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx +++ b/include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx @@ -35,7 +35,7 @@ namespace sdr::overlay virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; public: - explicit OverlayPrimitive2DSequenceObject(const drawinglayer::primitive2d::Primitive2DContainer& rSequence); + explicit OverlayPrimitive2DSequenceObject(drawinglayer::primitive2d::Primitive2DContainer&& rSequence); virtual ~OverlayPrimitive2DSequenceObject() override; }; diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx index 626467f18465..dec7c1b8c42e 100644 --- a/include/svx/svddrgmt.hxx +++ b/include/svx/svddrgmt.hxx @@ -90,8 +90,7 @@ private: drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence; public: - SdrDragEntryPrimitive2DSequence( - const drawinglayer::primitive2d::Primitive2DContainer& rSequence); + SdrDragEntryPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DContainer&& rSequence); virtual ~SdrDragEntryPrimitive2DSequence() override; virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override; |