summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-18 13:38:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-19 00:34:30 +0000
commit6ef1cb0c573c479b23866184b819be6226755179 (patch)
tree0f40abdab9b051bd31ce502f48129b1362632a38 /canvas
parent144ab285566afa18790356b5497573290ee710bf (diff)
move the cairo resize hack into vcl
Change-Id: I41868da3901d9c3fff69c11da467952176e58f09 Reviewed-on: https://gerrit.libreoffice.org/14897 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx12
1 files changed, 6 insertions, 6 deletions
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 <config_features.h>
-
#include <canvas/debug.hxx>
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
@@ -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()