[Libreoffice-commits] core.git: vcl/headless

Caolán McNamara caolanm at redhat.com
Fri Jul 29 01:56:22 UTC 2016


 vcl/headless/svpgdi.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit f5fd2c66f6d994761fa7d5f744f2f1bdd6a84cba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 10:45:56 2016 +0100

    set antialias once when context is created
    
    Change-Id: Id36e716253768321e1ddfb977a22470c6b694147
    Reviewed-on: https://gerrit.libreoffice.org/27510
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index af26bd1..ed8cdc6 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -686,10 +686,7 @@ void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
     cairo_t* cr = getCairoContext(false);
     clipRegion(cr);
 
-    bool bAA = getAntiAliasB2DDraw();
-
-    cairo_set_antialias(cr, bAA ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
-    AddPolygonToPath(cr, aPoly, aPoly.isClosed(), !bAA, true);
+    AddPolygonToPath(cr, aPoly, aPoly.isClosed(), !getAntiAliasB2DDraw(), true);
 
     applyColor(cr, m_aLineColor);
 
@@ -771,7 +768,6 @@ bool SvpSalGraphics::drawPolyLine(
     cairo_set_line_width(cr, rLineWidths.getX());
     cairo_set_miter_limit(cr, fMiterLimit);
 
-    cairo_set_antialias(cr, getAntiAliasB2DDraw() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
 
     basegfx::B2DRange extents(0, 0, 0, 0);
 
@@ -1288,6 +1284,7 @@ cairo_t* SvpSalGraphics::getCairoContext(bool bXorModeAllowed) const
         cr = cairo_create(m_pSurface);
     cairo_set_line_width(cr, 1);
     cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
+    cairo_set_antialias(cr, getAntiAliasB2DDraw() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
     if (m_ePaintMode == INVERT)
         cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
     else


More information about the Libreoffice-commits mailing list