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 /svgio/inc | |
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 'svgio/inc')
-rw-r--r-- | svgio/inc/svgstyleattributes.hxx | 4 | ||||
-rw-r--r-- | svgio/inc/svgtextnode.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index 05f3ef085fd3..3fbb7a2ff324 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -282,14 +282,14 @@ namespace svgio::svgreader /// helper which does the necessary with a given path void add_text( drawinglayer::primitive2d::Primitive2DContainer& rTarget, - drawinglayer::primitive2d::Primitive2DContainer const & rSource) const; + drawinglayer::primitive2d::Primitive2DContainer&& rSource) const; void add_path( const basegfx::B2DPolyPolygon& rPath, drawinglayer::primitive2d::Primitive2DContainer& rTarget, const basegfx::utils::PointIndexSet* pHelpPointIndices) const; void add_postProcess( drawinglayer::primitive2d::Primitive2DContainer& rTarget, - const drawinglayer::primitive2d::Primitive2DContainer& rSource, + drawinglayer::primitive2d::Primitive2DContainer&& rSource, const std::optional<basegfx::B2DHomMatrix>& pTransform) const; /// helper to set mpCssStyleParent temporarily for CSS style hierarchies diff --git a/svgio/inc/svgtextnode.hxx b/svgio/inc/svgtextnode.hxx index 9ff73d66d104..b72d1043b8c0 100644 --- a/svgio/inc/svgtextnode.hxx +++ b/svgio/inc/svgtextnode.hxx @@ -46,7 +46,7 @@ namespace svgio::svgreader static void addTextPrimitives( const SvgNode& rCandidate, drawinglayer::primitive2d::Primitive2DContainer& rTarget, - drawinglayer::primitive2d::Primitive2DContainer const & rSource); + drawinglayer::primitive2d::Primitive2DContainer&& rSource); public: SvgTextNode( |