basegfx/source/polygon/b2dpolypolygon.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 257b635dfa9bb65206b10b9a11810b30a7f345e8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Jul 31 21:53:53 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Aug 1 09:25:45 2024 +0200 ofz#70815 Timeout I see the cow_wrapper up copies the ImplB2DPolyPolygon during construction when it doesn't need to do that. #9 0x5ad39043b7f4 in void std::__1::vector<basegfx::B2DPolygon, std::__1::allocator<basegfx::B2DPolygon>>::__construct_at_end<basegfx::B2DPolygon*, basegfx::B2DPolygon*>(basegfx::B2DPolygon*, basegfx::B2DPolygon*, unsigned long) /usr/local/include/c++/v1/vector:1144:25 #10 0x5ad39043b48d in void std::__1::vector<basegfx::B2DPolygon, std::__1::allocator<basegfx::B2DPolygon>>::__init_with_size[abi:v180000]<basegfx::B2DPolygon*, basegfx::B2DPolygon*>(basegfx::B2DPolygon*, basegfx::B2DPolygon*, unsigned long) /usr/local/include/c++/v1/vector:776:9 #11 0x5ad393935cee in vector /usr/local/include/c++/v1/vector:1279:3 #12 0x5ad393935cee in ImplB2DPolyPolygon /src/libreoffice/basegfx/source/polygon/b2dpolypolygon.cxx:46:9 #13 0x5ad393935cee in impl_t /src/libreoffice/include/o3tl/cow_wrapper.hxx:195:17 #14 0x5ad393935cee in cow_wrapper /src/libreoffice/include/o3tl/cow_wrapper.hxx:236:26 #15 0x5ad393935cee in basegfx::B2DPolyPolygon::B2DPolyPolygon(basegfx::B2DPolygon const&) /src/libreoffice/basegfx/source/polygon/b2dpolypolygon.cxx:221:9 #16 0x5ad390b31418 in CairoCommon::drawPolygon(unsigned int, Point const*, bool) /src/libreoffice/vcl/headless/CairoCommon.cxx:864:46 #17 0x5ad39014ec77 in OutputDevice::ImplDrawPolygon(tools::Polygon const&, tools::PolyPolygon const*) /src/libreoffice/vcl/source/outdev/polygon.cxx:451:21 Change-Id: I801cf20d7fbc815ea285fde5c1f80f5b2681e6f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171336 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx index e830ea728921..f7203a46d88e 100644 --- a/basegfx/source/polygon/b2dpolypolygon.cxx +++ b/basegfx/source/polygon/b2dpolypolygon.cxx @@ -42,8 +42,13 @@ public: { } + explicit ImplB2DPolyPolygon(ImplB2DPolyPolygon&& rSource) noexcept + : maPolygons(std::move(rSource.maPolygons)) + { + } + explicit ImplB2DPolyPolygon(const ImplB2DPolyPolygon& rSource) - : maPolygons(rSource.maPolygons) + : maPolygons(rSource.maPolygons) { }