diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 09:46:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 12:32:30 +0000 |
commit | 34dc97c79165a038fd1262902a414fe78882aaba (patch) | |
tree | db27e5b67c2c82881aa3802130949eaed8224cdc /canvas | |
parent | 69d0d5f567f1418060f0c925b0dada2cb608eacc (diff) |
move IsCairoWorking to vclplug level and rename
Change-Id: Id31de932afa61df6933d61ddba971f5d7060f0c1
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_cairo.hxx | 3 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_canvas.cxx | 4 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_quartz_cairo.cxx | 6 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_spritecanvas.cxx | 6 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_win32_cairo.cxx | 6 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_xlib_cairo.cxx | 15 |
6 files changed, 5 insertions, 35 deletions
diff --git a/canvas/source/cairo/cairo_cairo.hxx b/canvas/source/cairo/cairo_cairo.hxx index 10c92038f5dd..ab73a569dd92 100644 --- a/canvas/source/cairo/cairo_cairo.hxx +++ b/canvas/source/cairo/cairo_cairo.hxx @@ -81,9 +81,6 @@ namespace cairo { SurfaceSharedPtr createBitmapSurface( const OutputDevice& rRefDevice, const BitmapSystemData& rData, const Size& rSize ); - - /// Check whether cairo will work on given window - bool IsCairoWorking( OutputDevice* ); } #endif diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx index 74da4c94efca..58bd7f0a030f 100644 --- a/canvas/source/cairo/cairo_canvas.cxx +++ b/canvas/source/cairo/cairo_canvas.cxx @@ -92,8 +92,8 @@ namespace cairocanvas if( !pSysData || !pSysData->nSize ) throw lang::NoSupportException( "Passed SystemGraphicsData invalid!" ); - bool bHasXRender = IsCairoWorking(pOutDev); - ENSURE_ARG_OR_THROW( bHasXRender == true, "SpriteCanvas::SpriteCanvas: No RENDER extension" ); + bool bHasCairo = pOutDev->SupportsCairo(); + ENSURE_ARG_OR_THROW(bHasCairo == true, "SpriteCanvas::SpriteCanvas: No Cairo capability"); // setup helper maDeviceHelper.init( *this, *pOutDev ); diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx index 006bfc7eb8b8..f4456aa596b4 100644 --- a/canvas/source/cairo/cairo_quartz_cairo.cxx +++ b/canvas/source/cairo/cairo_quartz_cairo.cxx @@ -35,12 +35,6 @@ namespace cairo { - bool IsCairoWorking( OutputDevice* ) - { - // trivially true for Mac - return true; - } - /** * QuartzSurface::Surface: Create generic Canvas surface using given Cairo Surface * diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx index 782d0433aebb..4e7be178cca0 100644 --- a/canvas/source/cairo/cairo_spritecanvas.cxx +++ b/canvas/source/cairo/cairo_spritecanvas.cxx @@ -85,9 +85,9 @@ namespace cairocanvas throw lang::NoSupportException( "Parent window not VCL window, or canvas out-of-process!", NULL); - bool bHasXRender = IsCairoWorking(pParentWindow); - ENSURE_ARG_OR_THROW( bHasXRender == true, - "CairoSpriteCanvas::SpriteCanvas: No RENDER extension" ); + bool bHasCairo = pParentWindow->SupportsCairo(); + ENSURE_ARG_OR_THROW(bHasCairo == true, + "CairoSpriteCanvas::SpriteCanvas: No Cairo capability"); Size aPixelSize( pParentWindow->GetOutputSizePixel() ); const ::basegfx::B2ISize aSize( aPixelSize.Width(), diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx index d00cc38627a8..20efd3381764 100644 --- a/canvas/source/cairo/cairo_win32_cairo.cxx +++ b/canvas/source/cairo/cairo_win32_cairo.cxx @@ -36,12 +36,6 @@ namespace cairo #include <cairo-win32.h> - bool IsCairoWorking( OutputDevice* ) - { - // trivially true for Windows - return true; - } - /** * Surface::Surface: Create generic Canvas surface using given Cairo Surface * diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx index 171d1053e5f4..a4665e14aa04 100644 --- a/canvas/source/cairo/cairo_xlib_cairo.cxx +++ b/canvas/source/cairo/cairo_xlib_cairo.cxx @@ -57,21 +57,6 @@ namespace cairo #include <cairo-xlib.h> #include <cairo-xlib-xrender.h> - // TODO(F3): svp headless case! - - bool IsCairoWorking( OutputDevice* pOutDev ) - { - if( !pOutDev ) - return false; - - Display* pDisplay = (Display*)pOutDev->GetSystemGfxData().pDisplay; - if( !pDisplay ) - return false; - - int nDummy; - return XQueryExtension( pDisplay, "RENDER", &nDummy, &nDummy, &nDummy ); - } - X11SysData::X11SysData() : pDisplay(NULL), hDrawable(0), |