summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-11-14 12:39:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-11-14 20:48:47 +0100
commit17476f1c9912b5ce31276a947d6a34ec8b9a3ed2 (patch)
tree39affbb693bd508a8f43e38b6d57fd8e1684e40d /vcl/headless
parentdbc307ef7c2351cd72e60ef46e647c908379db86 (diff)
cairo_fill is cheaper than cairo_paint
when we are only interested in copying a small chunk of the image. Shaves 25% off the cost of rendering here Change-Id: I3df726a08fad3ab3c330da74d09ee5e735e1bc60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/CairoCommon.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index cba7a7328fd4..164bc2856ee8 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -478,7 +478,7 @@ void CairoCommon::doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
cairo_rectangle(copycr, nExtentsLeft, nExtentsTop, nExtentsRight - nExtentsLeft,
nExtentsBottom - nExtentsTop);
cairo_set_source_surface(copycr, m_pSurface, 0, 0);
- cairo_paint(copycr);
+ cairo_fill(copycr);
target_surface = cairo_get_target(copycr);
cairo_destroy(copycr);
}
@@ -556,7 +556,7 @@ void CairoCommon::doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop,
cairo_rectangle(copycr, nExtentsLeft, nExtentsTop, nExtentsRight - nExtentsLeft,
nExtentsBottom - nExtentsTop);
cairo_set_source_surface(copycr, target_surface, 0, 0);
- cairo_paint(copycr);
+ cairo_fill(copycr);
cairo_destroy(copycr);
cairo_surface_destroy(target_surface);
}