drawinglayer/source/processor2d/vclprocessor2d.cxx | 27 +++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-)
New commits: commit df6293ad0634a29ff4d0196d1f9230062ccc95ca Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Aug 28 12:44:31 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Aug 28 19:35:30 2024 +0200 tdf#161983 Page background image follows scrolled view regression from commit 2a9b53bb9f85c2869c779dde36a2d77353fef14b Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Jun 27 10:18:15 2024 +0200 tdf#160345 Slow rendering of filled polygon Change-Id: I38abd82d33cc25a56a26d8ccac26fb5f90e9c0fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 718c725fc88f..889a46f1c019 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -722,27 +722,14 @@ bool VclProcessor2D::RenderFillGraphicPrimitive2DImpl( const sal_Int32 nOffsetX(basegfx::fround(rFillGraphicAttribute.getOffsetX() * nBWidth)); const sal_Int32 nOffsetY(basegfx::fround(rFillGraphicAttribute.getOffsetY() * nBHeight)); - if (nOffsetX == 0 && nOffsetY == 0) + // if the tile is a single pixel big, just flood fill with that pixel color + if (nOffsetX == 0 && nOffsetY == 0 && aNeededBitmapSizePixel.getWidth() == 1 + && aNeededBitmapSizePixel.getHeight() == 1) { - if (!bPreScaled) - aBitmapEx.Scale(aNeededBitmapSizePixel); - - // if the tile is a single pixel big, just flood fill with that pixel color - if (aNeededBitmapSizePixel.getWidth() == 1 && aNeededBitmapSizePixel.getHeight() == 1) - { - Color col = aBitmapEx.GetPixelColor(0, 0); - mpOutputDevice->SetLineColor(col); - mpOutputDevice->SetFillColor(col); - mpOutputDevice->DrawRect(aVisiblePixel); - } - else - { - // TODO vcl does not have an optimised path here, it should be passing some kind of fill/tile - // operation down to the cairo/skia layers - Wallpaper aWallpaper(aBitmapEx); - aWallpaper.SetColor(COL_TRANSPARENT); - mpOutputDevice->DrawWallpaper(aVisiblePixel, aWallpaper); - } + Color col = aBitmapEx.GetPixelColor(0, 0); + mpOutputDevice->SetLineColor(col); + mpOutputDevice->SetFillColor(col); + mpOutputDevice->DrawRect(aVisiblePixel); } else if (nOffsetX) {