[Libreoffice-commits] core.git: 2 commits - vcl/headless
Caolán McNamara
caolanm at redhat.com
Mon Mar 20 15:21:34 UTC 2017
vcl/headless/svpgdi.cxx | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
New commits:
commit edc58993ec81824d2822f0aa623fcbaa0a679fa5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 20 15:18:30 2017 +0000
Related: tdf#106577 extend damage rect a little for TrackFrame
Change-Id: I007ab53ba841c7c4a0f13bc9e7e306e88303191f
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 925a5adecd55..8449c9988da0 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1189,6 +1189,10 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags)
cairo_set_dash(cr, dashLengths, 2, 0);
extents = getClippedStrokeDamage(cr);
+ //see tdf#106577 under wayland, some pixel droppings seen, maybe we're
+ //out by one somewhere, or cairo_stroke_extents is confused by
+ //dashes/line width
+ extents.grow(1);
cairo_stroke(cr);
}
commit ec864247bc40d92e32e3b0f9916d3e39974c9116
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 20 15:08:01 2017 +0000
tdf#106577 cairo_mask pattern affects more surface than expected
Change-Id: I7f967c401f7b84fd696fa4cf8a944f7a5730917c
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 91b6f86e87cb..925a5adecd55 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1201,8 +1201,21 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags)
if (nFlags & SalInvert::N50)
{
cairo_pattern_t *pattern = create_stipple();
- cairo_mask(cr, pattern);
+ cairo_surface_t* surface = cairo_surface_create_similar(m_pSurface,
+ cairo_surface_get_content(m_pSurface),
+ extents.getWidth() * m_fScale,
+ extents.getHeight() * m_fScale);
+
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
+ cairo_surface_set_device_scale(surface, m_fScale, m_fScale);
+#endif
+ cairo_t* stipple_cr = cairo_create(surface);
+ cairo_set_source_rgb(stipple_cr, 1.0, 1.0, 1.0);
+ cairo_mask(stipple_cr, pattern);
cairo_pattern_destroy(pattern);
+ cairo_destroy(stipple_cr);
+ cairo_mask_surface(cr, surface, extents.getMinX(), extents.getMinY());
+ cairo_surface_destroy(surface);
}
else
{
More information about the Libreoffice-commits
mailing list