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

Caolán McNamara caolanm at redhat.com
Thu Nov 24 09:00:53 UTC 2016


 vcl/headless/svpgdi.cxx |    5 ++++-
 vcl/headless/svpvd.cxx  |    2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a250292c5eb7e4cdb2aa83bc08ae6c86c3ca65a1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 08:59:48 2016 +0000

    cairo_surface_set_device_scale is in >= cairo 1.14.0
    
    Change-Id: Iff47499d61dd6eb294d528fa8bfc5baf304ce151

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 46d8a8a..3f4a042 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -389,7 +389,9 @@ SvpSalGraphics::~SvpSalGraphics()
 void SvpSalGraphics::setSurface(cairo_surface_t* pSurface)
 {
     m_pSurface = pSurface;
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
     cairo_surface_get_device_scale(pSurface, &m_fScale, nullptr);
+#endif
     ResetClipRegion();
 }
 
@@ -991,8 +993,9 @@ void SvpSalGraphics::copyBits( const SalTwoRect& rTR,
                                             aTR.mnSrcWidth * m_fScale,
                                             aTR.mnSrcHeight * m_fScale);
 #endif
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
         cairo_surface_set_device_scale(pCopy, m_fScale, m_fScale);
-
+#endif
         cairo_t* cr = cairo_create(pCopy);
         cairo_set_source_surface(cr, source, -aTR.mnSrcX, -aTR.mnSrcY);
         cairo_rectangle(cr, 0, 0, aTR.mnSrcWidth, aTR.mnSrcHeight);
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index f0d31f8..ca28a52 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -89,7 +89,9 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
                                    nNewDX, nNewDY);
         }
 
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
         cairo_surface_set_device_scale(m_pSurface, m_fScale, m_fScale);
+#endif
 
         // update device in existing graphics
         for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();


More information about the Libreoffice-commits mailing list