[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/headless
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 9 15:12:16 UTC 2021
vcl/headless/svpgdi.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit f3c40912bb2731a0ec1d02357bd6375c875630b6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Apr 9 13:58:28 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Apr 9 17:11:40 2021 +0200
fix small cairo leak in gen backend
Change-Id: I57b8cd00d252cef2699d499b9080f829be9098da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113847
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 9940630266686d306fc2bc0ac3c20231f7f3d532)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113855
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index afcb9956c2cf..1f62de43c3b6 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1670,6 +1670,7 @@ bool SvpSalGraphics::drawGradient(const tools::PolyPolygon& rPolyPolygon, const
1.0);
cairo_set_source(cr, pattern);
+ cairo_pattern_destroy(pattern);
basegfx::B2DRange extents = getClippedFillDamage(cr);
cairo_fill_preserve(cr);
@@ -1689,8 +1690,7 @@ bool SvpSalGraphics::implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolyg
for (auto const & rPolygon : rPolyPolygon)
AddPolygonToPath(cr, rPolygon, rObjectToDevice, !getAntiAliasB2DDraw(), false);
- cairo_pattern_t* pattern;
- pattern = cairo_pattern_create_linear(rGradient.maPoint1.getX(), rGradient.maPoint1.getY(), rGradient.maPoint2.getX(), rGradient.maPoint2.getY());
+ cairo_pattern_t* pattern = cairo_pattern_create_linear(rGradient.maPoint1.getX(), rGradient.maPoint1.getY(), rGradient.maPoint2.getX(), rGradient.maPoint2.getY());
for (SalGradientStop const & rStop : rGradient.maStops)
{
@@ -1703,6 +1703,7 @@ bool SvpSalGraphics::implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolyg
cairo_pattern_add_color_stop_rgba(pattern, offset, r, g, b, a);
}
cairo_set_source(cr, pattern);
+ cairo_pattern_destroy(pattern);
basegfx::B2DRange extents = getClippedFillDamage(cr);
cairo_fill_preserve(cr);
More information about the Libreoffice-commits
mailing list