summaryrefslogtreecommitdiff
path: root/canvas/source/cairo/cairo_spritedevicehelper.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-19 14:43:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-23 11:42:28 +0000
commite510a208b01c87a341b43d74d8d901f992379b84 (patch)
tree7f437b7d48e60ec14b0051993a9f2eb88f40bd53 /canvas/source/cairo/cairo_spritedevicehelper.cxx
parent2b838285e206912374f464bd1ab8dc8a561f59f5 (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_spritedevicehelper.cxx')
-rw-r--r--canvas/source/cairo/cairo_spritedevicehelper.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx
index 523354809493..6f7730b2ee14 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.cxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx
@@ -31,12 +31,12 @@
#include <basegfx/tools/unopolypolygon.hxx>
#include <vcl/syschild.hxx>
+#include <vcl/cairo.hxx>
#include <vcl/canvastools.hxx>
#include "cairo_spritecanvas.hxx"
#include "cairo_canvasbitmap.hxx"
#include "cairo_devicehelper.hxx"
-#include "cairo_cairo.hxx"
using namespace ::cairo;
using namespace ::com::sun::star;
@@ -134,7 +134,7 @@ namespace cairocanvas
return DeviceHelper::getSurface();
}
- SurfaceSharedPtr SpriteDeviceHelper::createSurface( const ::basegfx::B2ISize& rSize, Content aContent )
+ SurfaceSharedPtr SpriteDeviceHelper::createSurface( const ::basegfx::B2ISize& rSize, int aContent )
{
if( mpBufferSurface )
return mpBufferSurface->getSimilar( aContent, rSize.getX(), rSize.getY() );
@@ -144,13 +144,12 @@ namespace cairocanvas
SurfaceSharedPtr SpriteDeviceHelper::createSurface( BitmapSystemData& rData, const Size& rSize )
{
- if( getOutputDevice() )
- return createBitmapSurface( *getOutputDevice(), rData, rSize );
-
+ OutputDevice *pDevice = getOutputDevice();
+ if (pDevice)
+ return pDevice->CreateBitmapSurface(rData, rSize);
return SurfaceSharedPtr();
}
-
/** SpriteDeviceHelper::flush Flush the platform native window
*
* Flushes the window by using the internally stored mpSysData.