diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-19 14:43:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-23 11:42:28 +0000 |
commit | e510a208b01c87a341b43d74d8d901f992379b84 (patch) | |
tree | 7f437b7d48e60ec14b0051993a9f2eb88f40bd53 /canvas/source/cairo/cairo_devicehelper.cxx | |
parent | 2b838285e206912374f464bd1ab8dc8a561f59f5 (diff) |
move cairo helpers to vcl and make per-plug
Change-Id: I4de4d5c3a191784598e93a8cf70e45a3f59ae857
Reviewed-on: https://gerrit.libreoffice.org/14907
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas/source/cairo/cairo_devicehelper.cxx')
-rw-r--r-- | canvas/source/cairo/cairo_devicehelper.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index c5296b733277..9e7ba2e13ca5 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -65,12 +65,11 @@ namespace cairocanvas { implInit(rSurfaceProvider, rRefDevice); - OutputDevice* pOutDev=getOutputDevice(); - mpSurface = cairo::createSurface( *pOutDev, - pOutDev->GetOutOffXPixel(), - pOutDev->GetOutOffYPixel(), - pOutDev->GetOutputWidthPixel(), - pOutDev->GetOutputHeightPixel() ); + OutputDevice* pOutDev = getOutputDevice(); + mpSurface = pOutDev->CreateSurface(pOutDev->GetOutOffXPixel(), + pOutDev->GetOutOffYPixel(), + pOutDev->GetOutputWidthPixel(), + pOutDev->GetOutputHeightPixel()); } void DeviceHelper::disposing() @@ -99,8 +98,7 @@ namespace cairocanvas if (!bReuseSurface) { - mpSurface = cairo::createSurface( - *pOutDev, + mpSurface = pOutDev->CreateSurface( pOutDev->GetOutOffXPixel(), pOutDev->GetOutOffYPixel(), rSize.getX(), rSize.getY() ); @@ -260,7 +258,7 @@ namespace cairocanvas } } - SurfaceSharedPtr DeviceHelper::createSurface( const ::basegfx::B2ISize& rSize, Content aContent ) + SurfaceSharedPtr DeviceHelper::createSurface( const ::basegfx::B2ISize& rSize, int aContent ) { if( mpSurface ) return mpSurface->getSimilar( aContent, rSize.getX(), rSize.getY() ); @@ -270,8 +268,8 @@ namespace cairocanvas SurfaceSharedPtr DeviceHelper::createSurface( BitmapSystemData& rData, const Size& rSize ) { - if( mpRefDevice ) - return createBitmapSurface( *mpRefDevice, rData, rSize ); + if (mpRefDevice) + return mpRefDevice->CreateBitmapSurface(rData, rSize); return SurfaceSharedPtr(); } |