vcl/headless/CairoCommon.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
New commits: commit 375258bd740f6193b7756c086c7fd08985e22e84 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 2 10:55:04 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Oct 3 11:53:34 2023 +0200 tdf#157164 Vertical Position preview does not show red line for baseline regression from commit f510ea2d7962a4325055c6380a0032331b4e87cf Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Jan 12 11:49:35 2022 +0200 don't bother trying to draw stuff which is effectively invisible Change-Id: Idc947163521ebfb65b27204fb5c65b1f59fe6de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157481 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157495 diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 9c67fb079566..ffcd50014e48 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -885,11 +885,16 @@ bool CairoCommon::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice, return true; } - // don't bother trying to draw stuff which is effectively invisible - basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange(); - aPolygonRange.transform(rObjectToDevice); - if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1) - return true; + if (!bHasLine) + { + // don't bother trying to draw stuff which is effectively invisible, speeds up + // drawing some complex drawings. This optimisation is not valid when we do + // the pixel offset thing (i.e. bHasLine) + basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange(); + aPolygonRange.transform(rObjectToDevice); + if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1) + return true; + } cairo_t* cr = getCairoContext(true, bAntiAlias); if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)