diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-02 10:55:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-02 15:38:47 +0200 |
commit | 5b2ae79edde95f485e381741f816d45248798778 (patch) | |
tree | 002430fa44c34fb3984d593f7d5925f017f87f02 /vcl | |
parent | 715a6ea8cb3aa6c80edbb22909aac3f18b7daec6 (diff) |
tdf#157164 Vertical Position preview does not show red line for baseline
regression from
commit f510ea2d7962a4325055c6380a0032331b4e87cf
Author: Noel Grandin <noel.grandin@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.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
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) |