diff options
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 17 | ||||
-rw-r--r-- | vcl/headless/svpinst.cxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpvd.cxx | 4 |
3 files changed, 22 insertions, 1 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 9a3fa5e2d2aa..302a160cb85c 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -746,9 +746,26 @@ bool SvpSalGraphics::supportsOperation( OutDevSupportType ) const void SvpSalGraphics::SetVirDevGraphics( CGLayerRef xLayer, CGContextRef xContext, int /* nBitmapDepth */ ) { + SAL_INFO( "vcl.ios", "SetVirDevGraphics() this=" << this << " layer=" << xLayer << " context=" << xContext ); + mxLayer = xLayer; mrContext = xContext; mbForeignContext = xContext != NULL; + + if( !mxLayer && !mrContext ) + return; + + if( !mxLayer ) + { + mnWidth = CGBitmapContextGetWidth( mrContext ); + mnHeight = CGBitmapContextGetHeight( mrContext ); + } + else + { + const CGSize aSize = CGLayerGetSize( mxLayer ); + mnWidth = static_cast<int>(aSize.width); + mnHeight = static_cast<int>(aSize.height); + } }; void SvpSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeight) diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index a9953a94478f..b76fdf84c42c 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -227,7 +227,7 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, return new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), nDX, nDY, nBitCount, pData ); else { - SvpSalVirtualDevice* pNew = new SvpSalVirtualDevice( nBitCount ); + AquaSalVirtualDevice* pNew = new AquaSalVirtualDevice( NULL, nDX, nDY, nBitCount, NULL ); pNew->SetSize( nDX, nDY ); return pNew; } diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx index 0f3c197ed0f5..d9ca7d2e5619 100644 --- a/vcl/headless/svpvd.cxx +++ b/vcl/headless/svpvd.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#ifndef IOS + #include "headless/svpbmp.hxx" #include "headless/svpvd.hxx" #include "headless/svpgdi.hxx" @@ -113,4 +115,6 @@ void SvpSalVirtualDevice::GetSize( long& rWidth, long& rHeight ) rWidth = rHeight = 0; } +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |