diff options
author | Mox Soini <mox@iki.fi> | 2015-06-02 23:52:56 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-06-04 21:31:58 +0000 |
commit | e4d55e8045c99af65a2cae57b26ec076825c9673 (patch) | |
tree | 3a56aa0c7998ff643e15c0edee5ad8fdaa0e1fed /vcl/quartz | |
parent | 8854643a0a964f6aa511013c6ab31ed198c74e86 (diff) |
Cleanup crossplatform cairo
Mac / Win cairo is not built / used, this cairo code can be removed to
reduce code bloat.
Change-Id: I758d674291e25e0722f5c66a0096295e903786b1
Reviewed-on: https://gerrit.libreoffice.org/16049
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdi.cxx | 10 | ||||
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 118 |
2 files changed, 0 insertions, 128 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 52cf48acf816..4f2104d79659 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -750,16 +750,6 @@ void AquaSalGraphics::FreeEmbedFontData( const void* pData, long /*nDataLen*/ ) DBG_ASSERT( (pData!=NULL), "AquaSalGraphics::FreeEmbedFontData() is not implemented\n"); } -SystemFontData AquaSalGraphics::GetSysFontData( int /* nFallbacklevel */ ) const -{ - SystemFontData aSysFontData; - aSysFontData.nSize = sizeof( SystemFontData ); - - aSysFontData.bAntialias = !mbNonAntialiasedText; - - return aSysFontData; -} - bool AquaSalGraphics::IsFlipped() const { #ifdef MACOSX diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 1464f18ce323..b4e50e454dac 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -39,11 +39,6 @@ #include <vcl/sysdata.hxx> #endif -#include <config_cairo_canvas.h> -#if ENABLE_CAIRO_CANVAS -#include "cairo_quartz_cairo.hxx" -#endif - #if defined(IOS) && defined(DBG_UTIL) // Variables in TiledView.m @@ -1450,119 +1445,6 @@ SystemGraphicsData AquaSalGraphics::GetGraphicsData() const return aRes; } -bool AquaSalGraphics::SupportsCairo() const -{ -#if ENABLE_CAIRO_CANVAS - return true; -#else - return false; -#endif -} - -/** - * cairo::createSurface: Create generic Canvas surface using given Cairo Surface - * - * @param rSurface Cairo Surface - * - * @return new Surface - */ -cairo::SurfaceSharedPtr AquaSalGraphics::CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const -{ -#if ENABLE_CAIRO_CANVAS - return cairo::SurfaceSharedPtr(new cairo::QuartzSurface(rSurface)); -#else - (void)rSurface; - return cairo::SurfaceSharedPtr(); -#endif -} - -/** - * cairo::createSurface: Create Canvas surface using given VCL Window or Virtualdevice - * - * @param rSurface Cairo Surface - * - * For VCL Window, use platform native system environment data (struct SystemEnvData in vcl/inc/sysdata.hxx) - * For VCL Virtualdevice, use platform native system graphics data (struct SystemGraphicsData in vcl/inc/sysdata.hxx) - * - * @return new Surface - */ -cairo::SurfaceSharedPtr AquaSalGraphics::CreateSurface( const OutputDevice& rRefDevice, - int x, int y, int width, int height ) const -{ - cairo::SurfaceSharedPtr surf; -#if ENABLE_CAIRO_CANVAS - if( rRefDevice.GetOutDevType() == OUTDEV_WINDOW ) - { - const vcl::Window &rWindow = (const vcl::Window &) rRefDevice; - const SystemEnvData* pSysData = GetSysData(&rWindow); - if (pSysData) - surf = cairo::SurfaceSharedPtr(new cairo::QuartzSurface(pSysData->pView, x, y, width, height)); - } - else if( rRefDevice.GetOutDevType() == OUTDEV_VIRDEV ) - { - SystemGraphicsData aSysData = ((const VirtualDevice&) rRefDevice).GetSystemGfxData(); - - if (aSysData.rCGContext) - surf = cairo::SurfaceSharedPtr(new cairo::QuartzSurface(aSysData.rCGContext, x, y, width, height)); - } -#else - (void)rRefDevice; - (void)x; - (void)y; - (void)width; - (void)height; -#endif - return surf; -} - -/** - * cairo::createBitmapSurface: Create platform native Canvas surface from BitmapSystemData - * @param OutputDevice (not used) - * @param rData Platform native image data (struct BitmapSystemData in vcl/inc/bitmap.hxx) - * @param rSize width and height of the new surface - * - * Create a surface based on image data on rData - * - * @return new surface or empty surface - **/ -cairo::SurfaceSharedPtr AquaSalGraphics::CreateBitmapSurface( const OutputDevice& /* rRefDevice */, - const BitmapSystemData& rData, - const Size& rSize ) const -{ -#if ENABLE_CAIRO_CANVAS - OSL_TRACE( "requested size: %d x %d available size: %d x %d", - rSize.Width(), rSize.Height(), rData.mnWidth, rData.mnHeight ); - - if ( rData.mnWidth == rSize.Width() && rData.mnHeight == rSize.Height() ) - { - CGContextRef rContext = (CGContextRef)rData.rImageContext; - OSL_TRACE("Canvas::cairo::createBitmapSurface(): New native image surface, context = %p.", rData.rImageContext); - - return cairo::SurfaceSharedPtr(new cairo::QuartzSurface(rContext, 0, 0, rData.mnWidth, rData.mnHeight)); - } -#else - (void)rData; - (void)rSize; -#endif - return cairo::SurfaceSharedPtr(); -} - -css::uno::Any AquaSalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const ::basegfx::B2ISize& /*rSize*/) const -{ - sal_IntPtr handle; -#if ENABLE_CAIRO_CANVAS - cairo::QuartzSurface* pQuartzSurface = dynamic_cast<cairo::QuartzSurface*>(rSurface.get()); - OSL_ASSERT(pQuartzSurface); - handle = sal_IntPtr (pQuartzSurface->getCGContext()); -#else - handle = 0; - (void)rSurface; -#endif - css::uno::Sequence< css::uno::Any > args( 1 ); - args[0] = css::uno::Any( handle ); - return css::uno::Any( args ); -} - long AquaSalGraphics::GetGraphicsWidth() const { long w = 0; |