[Libreoffice-commits] core.git: vcl/headless

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 9 11:31:50 UTC 2020


 vcl/headless/svpgdi.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 01304a0a3e5d52f46c8519d640ff3787ca3dca7c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 9 11:54:17 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Apr 9 13:31:02 2020 +0200

    tdf#104878 use faster but less accurate cairo_path_extents
    
    which doesn't matter for damage calculations, halves the time in
    processPolygonStrokePrimitive2D
    
    Change-Id: I0e3d37e77e7760d484b961de8bef22cc5ba1e09a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91957
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 445afef65400..b5649b093e31 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -102,7 +102,8 @@ namespace
     {
         double x1, y1, x2, y2;
 
-        cairo_stroke_extents(cr, &x1, &y1, &x2, &y2);
+        // less accurate, but much faster
+        cairo_path_extents(cr, &x1, &y1, &x2, &y2);
 
         // support B2DRange::isEmpty()
         if(0.0 != x1 || 0.0 != y1 || 0.0 != x2 || 0.0 != y2)


More information about the Libreoffice-commits mailing list