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 /drawinglayer/source/primitive2d/graphicprimitive2d.cxx | |
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 'drawinglayer/source/primitive2d/graphicprimitive2d.cxx')
-rw-r--r-- | drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 4a0607a0e6e2..d2e9c882922c 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -32,10 +32,10 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& + Primitive2DContainer GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& ) const { - Primitive2DSequence aRetval; + Primitive2DContainer aRetval; if(255L == getGraphicAttr().GetTransparency()) { @@ -110,7 +110,7 @@ namespace drawinglayer aTransformedGraphic, aTransform); - if(!aRetval.getLength()) + if(!aRetval.size()) { // content is invisible, done return aRetval; @@ -131,7 +131,7 @@ namespace drawinglayer basegfx::clamp(aSuppressGraphicAttr.GetGamma(), 0.0, 10.0), aSuppressGraphicAttr.IsInvert()); - if(!aRetval.getLength()) + if(!aRetval.size()) { // content is invisible, done return aRetval; @@ -150,7 +150,7 @@ namespace drawinglayer aRetval, fTransparency)); - aRetval = Primitive2DSequence(&aUnifiedTransparence, 1); + aRetval = Primitive2DContainer { aUnifiedTransparence }; } } @@ -179,7 +179,7 @@ namespace drawinglayer getGraphicAttr().GetRightCrop() * aCropScaleFactor.getX(), getGraphicAttr().GetBottomCrop() * aCropScaleFactor.getY())); - aRetval = Primitive2DSequence(&xPrimitive, 1); + aRetval = Primitive2DContainer { xPrimitive }; } return aRetval; |