sc/source/ui/view/output.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 0ce1e13d2d530c891cad0d8b456adfa2c0d55df6
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun May 29 20:45:28 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 30 10:07:28 2022 +0200

    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.gran...@collabora.co.uk>

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);

Reply via email to