summaryrefslogtreecommitdiff
path: root/vcl/headless/svpinst.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-03-24 13:27:48 +0200
committerTor Lillqvist <tml@collabora.com>2014-03-24 14:47:08 +0200
commit1d9561f56c0e39aa54e3f23d509be98514ff2abc (patch)
treefda727d78d0f7087300bb72f975b1fd2339e110e /vcl/headless/svpinst.cxx
parent6ce67f4f636cd7cc93abb87b0fca32f433045741 (diff)
Fix a few problems in the iOS vcl code
We don't need the headless SvpSalBitmap code after all on iOS, so bypass all of svpbmp.cxx for iOS. I accidentally had left duplicates for some AquaSalGraphics methods in headless/svpgdi.cxx in addition to the ones in quartz/salgdicommon.cxx. This is obviously bogus, the linker just picks the ones that come first in the archive. (Remember the ugly "#define SvpSalGraphics AquaSalGraphics" trick, so for instance SvpSalGraphics::setClipRegion actuall is AquaSalGraphics::setClipRegion.) It's the Quartz ones we want, as since the switch to tiled rendering the iOS vcl code is supposed to work much more like the OS X one. (There is still some significant refactoring to do there. Possibly no "headless" code needs to be used at all for iOS.) A couple of functions moved from salgdiutils.cxx (which isn't compiled for iOS) to salgdicommon.cxx. The SetState() function now gets used also on iOS, and to properly undo its CG context stacking I pop it in SetVirDevGraphics() when the virtual device is being destroyed. This fixed the rendering of some simple shapes that use overlapping and transparency, but not that of the "monster" SmartArts. Change-Id: I2bfaa4129e3641dbdd1dd240c1d07f9bdcfea1b8
Diffstat (limited to 'vcl/headless/svpinst.cxx')
-rw-r--r--vcl/headless/svpinst.cxx21
1 files changed, 6 insertions, 15 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index a88243992e45..aaf1592a3136 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -216,27 +216,16 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
delete pObject;
}
-SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* pGraphics,
+#ifndef IOS
+
+SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics */,
long nDX, long nDY,
sal_uInt16 nBitCount,
- const SystemGraphicsData* pData )
+ const SystemGraphicsData* /* pData */ )
{
-#ifdef IOS
- if( pData )
- return new AquaSalVirtualDevice( static_cast< AquaSalGraphics* >( pGraphics ), nDX, nDY, nBitCount, pData );
- else
- {
- AquaSalVirtualDevice* pNew = new AquaSalVirtualDevice( NULL, nDX, nDY, nBitCount, NULL );
- pNew->SetSize( nDX, nDY );
- return pNew;
- }
-#else
- (void) pGraphics;
- (void) pData;
SvpSalVirtualDevice* pNew = new SvpSalVirtualDevice( nBitCount );
pNew->SetSize( nDX, nDY );
return pNew;
-#endif
}
void SvpSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
@@ -244,6 +233,8 @@ void SvpSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
delete pDevice;
}
+#endif
+
SalTimer* SvpSalInstance::CreateSalTimer()
{
return new SvpSalTimer( this );