diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-12-18 00:03:02 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-12-18 22:59:23 +0200 |
commit | 48f625b899b2c7774548af078f25dfccd7602d27 (patch) | |
tree | cd45eb893d6b8e9270202cbe053bd7a2a73d6ca7 /vcl/quartz | |
parent | resolved fdo#51961 let "Default ..." currency entry follow selected locale (diff) | |
download | core-48f625b899b2c7774548af078f25dfccd7602d27.tar.gz core-48f625b899b2c7774548af078f25dfccd7602d27.zip |
Add a view-only iOS test app using tiled rendering
I had to add some horrible hacks to make sure the test doc has been
loaded into a Writer shell before retrieving its size and being able
to render it. Obviously some better solution is needed. But this is
just a testbed to get some profiling data.
The app is built using an Xcode project, and in gbuild through a
custom target based on the MobileLibreOffice one. Setting up the
various files used (or not used...) at run-time should really be
factored out from the CustomTarget files.
Change-Id: I1711b0cae9d28a09b73476b2d37d98b1820c9943
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 12 | ||||
-rw-r--r-- | vcl/quartz/salvd.cxx | 16 |
2 files changed, 27 insertions, 1 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 75fea3f9738e..6f96a6c7dcc0 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -293,6 +293,13 @@ static inline void alignLinePoint( const SalPoint* i_pIn, float& o_fX, float& o_ void AquaSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics *pSrcGraphics ) { +#ifdef IOS + // Horrible horrible this is all crack, mxLayer is always NULL on iOS, + // all this stuff should be rewritten anyway for iOS + if( !mxLayer ) + return; +#endif + if( !pSrcGraphics ) { pSrcGraphics = this; @@ -452,6 +459,11 @@ void AquaSalGraphics::ApplyXorContext() void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, sal_uInt16 /*nFlags*/ ) { +#ifdef IOS + if( !mxLayer ) + return; +#endif + ApplyXorContext(); DBG_ASSERT( mxLayer!=NULL, "AquaSalGraphics::copyArea() for non-layered graphics" ); diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 7b041b9dbf56..07753bc8b800 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -69,9 +69,23 @@ AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, if( pGraphic && pData && pData->rCGContext ) { // Create virtual device based on existing SystemGraphicsData - // We ignore nDx and nDY, as the desired size comes from the SystemGraphicsData + // We ignore nDx and nDY, as the desired size comes from the SystemGraphicsData. + // WTF does the above mean, SystemGraphicsData has no size field(s). mbForeignContext = true; // the mxContext is from pData mpGraphics = new AquaSalGraphics( /*pGraphic*/ ); +#ifdef IOS + // Note: we should *not* create a CGLayer and assign it to + // mxLayer here. Don't confuse CGLayer and CALayer. A CGLayer + // is basically a fancy off-screen bitmap not related to + // anything being displayed at all. The CGContext passed in + // here refers to something actively part of the compositor + // stack and being dislayed on the device, and *there* + // CALayers are involved, sure. The use of mxLayer in this + // code is for "traditional" LO virtual devices, off-screen + // bitmaps. I think. On the other hand, the use of + // VirtualDevice with a "foreign" CGContext for OS X is + // actually dead code... +#endif mpGraphics->SetVirDevGraphics( mxLayer, pData->rCGContext ); } else |