vcl/headless/CairoCommon.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
New commits: commit 5b2ae79edde95f485e381741f816d45248798778 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 2 10:55:04 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 2 15:38:47 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> diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 954e29a2026d..abd024293314 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -886,11 +886,16 @@ void CairoCommon::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice, return; } - // 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; + 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; + } cairo_t* cr = getCairoContext(true, bAntiAlias); if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)