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/processor2d/vclprocessor2d.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/processor2d/vclprocessor2d.cxx')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index b6edfa4a3d7d..2d411f38e14e 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -864,7 +864,7 @@ namespace drawinglayer // mask group. Force output to VDev and create mask from given mask void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate) { - if(rMaskCandidate.getChildren().hasElements()) + if(!rMaskCandidate.getChildren().empty()) { basegfx::B2DPolyPolygon aMask(rMaskCandidate.getMask()); @@ -917,7 +917,7 @@ namespace drawinglayer // modified color group. Force output to unified color. void VclProcessor2D::RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate) { - if(rModifiedCandidate.getChildren().hasElements()) + if(!rModifiedCandidate.getChildren().empty()) { maBColorModifierStack.push(rModifiedCandidate.getColorModifier()); process(rModifiedCandidate.getChildren()); @@ -930,7 +930,7 @@ namespace drawinglayer { static bool bForceToDecomposition(false); - if(rTransCandidate.getChildren().hasElements()) + if(!rTransCandidate.getChildren().empty()) { if(bForceToDecomposition) { @@ -947,7 +947,7 @@ namespace drawinglayer else if(rTransCandidate.getTransparence() > 0.0 && rTransCandidate.getTransparence() < 1.0) { // transparence is in visible range - basegfx::B2DRange aRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rTransCandidate.getChildren(), getViewInformation2D())); + basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D())); aRange.transform(maCurrentTransformation); impBufferDevice aBufferDevice(*mpOutputDevice, aRange, true); @@ -974,9 +974,9 @@ namespace drawinglayer // sub-transparence group. Draw to VDev first. void VclProcessor2D::RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate) { - if(rTransCandidate.getChildren().hasElements()) + if(!rTransCandidate.getChildren().empty()) { - basegfx::B2DRange aRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rTransCandidate.getChildren(), getViewInformation2D())); + basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D())); aRange.transform(maCurrentTransformation); impBufferDevice aBufferDevice(*mpOutputDevice, aRange, true); |