summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-29 20:45:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-30 10:07:28 +0200
commit0ce1e13d2d530c891cad0d8b456adfa2c0d55df6 (patch)
treed5263522de414b44a6c601270ab1b1bf0cebf42d
parent30400ebae2a46524558925424d41e612f1c1dc17 (diff)
in ScOutputData::DrawFrame, we can skip the intermediate container
and just feed the data in as we create it Change-Id: I5112e0b61bc4f4976978d5e4724053ab9ffc97e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/view/output.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 5adb04415684..38417d000be5 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1490,7 +1490,6 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D());
if (!pProcessor)
return;
- drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
while( nRow1 <= nLastRow )
{
while( (nRow1 <= nLastRow) && !pRowInfo[ nRow1 ].bChanged ) ++nRow1;
@@ -1498,13 +1497,12 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
{
size_t nRow2 = nRow1;
while( (nRow2 + 1 <= nLastRow) && pRowInfo[ nRow2 + 1 ].bChanged ) ++nRow2;
- aPrimitives.append(
- rArray.CreateB2DPrimitiveRange(
- nFirstCol, nRow1, nLastCol, nRow2, pForceColor ));
+ auto xPrimitive = rArray.CreateB2DPrimitiveRange(
+ nFirstCol, nRow1, nLastCol, nRow2, pForceColor );
+ pProcessor->process(xPrimitive);
nRow1 = nRow2 + 1;
}
}
- pProcessor->process(aPrimitives);
pProcessor.reset();
rRenderContext.SetDrawMode(nOldDrawMode);