diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-12-04 18:23:22 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-12-04 19:30:50 +0100 |
commit | 5b607ae89de9494c01952852df30a6f77206eadc (patch) | |
tree | 897d5d412e09c70b8f9c56438cff18d4b1709faf | |
parent | 303d1e5bd3565b94ca342b832146beee815d1392 (diff) |
headless: Don't leak the cairo context in drawPixel().
Change-Id: If841f655ac634eee2dc7ca6e9445d2f204546545
Reviewed-on: https://gerrit.libreoffice.org/84445
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | vcl/headless/svpgdi.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 1b89dde1fac0..86ac6254c5bf 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -714,12 +714,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 ) |