From 6ef1cb0c573c479b23866184b819be6226755179 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 18 Mar 2015 13:38:11 +0000 Subject: move the cairo resize hack into vcl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I41868da3901d9c3fff69c11da467952176e58f09 Reviewed-on: https://gerrit.libreoffice.org/14897 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- canvas/source/cairo/cairo_devicehelper.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index fab8b1b0e754..05266e424457 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include #include @@ -94,18 +92,20 @@ namespace cairocanvas OutputDevice* pOutDev=getOutputDevice(); -#if HAVE_FEATURE_X11 - // X11 only - if( mpSurface ) + if (mpSurface && pOutDev->CanResizeCairoSurface()) + { + // X11 only mpSurface->Resize( rSize.getX() + pOutDev->GetOutOffXPixel(), rSize.getY() + pOutDev->GetOutOffYPixel() ); + } else -#endif + { mpSurface = cairo::createSurface( *pOutDev, pOutDev->GetOutOffXPixel(), pOutDev->GetOutOffYPixel(), rSize.getX(), rSize.getY() ); + } } geometry::RealSize2D DeviceHelper::getPhysicalResolution() -- cgit