From 01304a0a3e5d52f46c8519d640ff3787ca3dca7c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Apr 2020 11:54:17 +0200 Subject: 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 --- vcl/headless/svpgdi.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit