diff options
author | Noel Grandin <noel@peralex.com> | 2015-12-10 12:27:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-12-11 10:11:23 +0200 |
commit | 58d8d8ac67aa9b907f1304a48efa0f7a473d9de4 (patch) | |
tree | a0d88f3c8a57ce9d08d97c803ea0ec83a3dd8b62 /include/drawinglayer/primitive2d/sceneprimitive2d.hxx | |
parent | 44ad6aca0dee29841ec7cd15c6d0ad9b3dcaedbe (diff) |
tdf#69977: uno::Sequence is expensive
when used as a mutable data-structure. Plain std::vector halves the time
taken to display the chart dialog
Create a class to represent the std::vector we are going to be passing
around, and move some of the utility methods into it to make the code
prettier.
Also create an optimised append(&&) method for the common case of
appending small temporaries.
Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
Diffstat (limited to 'include/drawinglayer/primitive2d/sceneprimitive2d.hxx')
-rw-r--r-- | include/drawinglayer/primitive2d/sceneprimitive2d.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx index 9c3fb8e9d846..be2681f5f4e6 100644 --- a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -72,7 +72,7 @@ namespace drawinglayer geometry::ViewInformation3D maViewInformation3D; /// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) - Primitive2DSequence maShadowPrimitives; + Primitive2DContainer maShadowPrimitives; /// bitfield /** flag if given 3D geometry is already cheched for shadow definitions and 2d shadows @@ -100,7 +100,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; public: /// public helpers @@ -108,8 +108,8 @@ namespace drawinglayer the 3D content is not converted to a bitmap visualisation but to projected 2D geometry. This helper is useful e.g. for Contour extraction or HitTests. */ - Primitive2DSequence getGeometry2D() const; - Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; + Primitive2DContainer getGeometry2D() const; + Primitive2DContainer getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; /** Fast HitTest which uses the last buffered BitmapEx from the last rendered area if available. The return value describes if the check @@ -147,7 +147,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// get local decomposition. Override since this decomposition is view-dependent - virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer |