[Libreoffice-commits] core.git: vcl/headless
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 5 09:20:01 UTC 2019
vcl/headless/svpgdi.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 7b267be4b2c87b2c3987d4d751307977a7d3ad41
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Dec 4 18:23:22 2019 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Dec 5 10:18:44 2019 +0100
headless: Don't leak the cairo context in drawPixel().
Change-Id: If841f655ac634eee2dc7ca6e9445d2f204546545
Reviewed-on: https://gerrit.libreoffice.org/84445
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 5b607ae89de9494c01952852df30a6f77206eadc)
Reviewed-on: https://gerrit.libreoffice.org/84450
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index bef205b45e6b..07f15821496d 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -720,12 +720,15 @@ void SvpSalGraphics::drawPixel( long nX, long nY )
void SvpSalGraphics::drawPixel( long nX, long nY, Color aColor )
{
- cairo_t* cr = getCairoContext(true);
+ cairo_t* cr = getCairoContext(false);
clipRegion(cr);
cairo_rectangle(cr, nX, nY, 1, 1);
applyColor(cr, aColor, 0.0);
cairo_fill(cr);
+
+ basegfx::B2DRange extents = getClippedFillDamage(cr);
+ releaseCairoContext(cr, false, extents);
}
void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
More information about the Libreoffice-commits
mailing list