From f59345721b1731c0fd5ed052f2dee99042bd7f4c 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 Change-Id: Ifd1817a28f4fb7ddcc85447fd3388fd0efd86476 --- 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