vcl/headless/CairoCommon.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 17476f1c9912b5ce31276a947d6a34ec8b9a3ed2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Nov 14 12:39:05 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Nov 14 20:48:47 2022 +0100 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.gran...@collabora.co.uk> 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); }