diff options
Diffstat (limited to 'canvas/source/cairo/cairo_devicehelper.cxx')
-rw-r--r-- | canvas/source/cairo/cairo_devicehelper.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index 920481e92875..c5296b733277 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -90,15 +90,14 @@ namespace cairocanvas if( !mpRefDevice ) return; // disposed - OutputDevice* pOutDev=getOutputDevice(); + OutputDevice* pOutDev = getOutputDevice(); - if (mpSurface && pOutDev->CanResizeCairoSurface()) - { - // X11 only - mpSurface->Resize( rSize.getX() + pOutDev->GetOutOffXPixel(), - rSize.getY() + pOutDev->GetOutOffYPixel() ); - } - else + // X11 only + bool bReuseSurface = mpSurface && + mpSurface->Resize(rSize.getX() + pOutDev->GetOutOffXPixel(), + rSize.getY() + pOutDev->GetOutOffYPixel()); + + if (!bReuseSurface) { mpSurface = cairo::createSurface( *pOutDev, |