summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-08-17 01:02:11 +0300
committerTor Lillqvist <tml@collabora.com>2016-08-17 18:16:10 +0300
commitfb83fd9d22e07f8a12e5f54eea60440123125717 (patch)
treea8a59a1c3f33a5192d4625152a2d8529eb0e1ed0 /vcl/headless
parentf07b8e63fde24c04e0f496c356319440e03b4741 (diff)
Massage ifdefs etc for iOS to avoid undefineds
I think it's best to not use cairo on iOS, even if we do use it on Android. We probably want to use native APIs for the functionality that cairo would provide. Just like we do on OS X. No idea whether the resulting TiledLibreOffice will still work like it used to in May last year, when I last tried. Change-Id: Ie15cad6918d7a66e2aff7faabfcade7f3246b060
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpbmp.cxx4
-rw-r--r--vcl/headless/svpgdi.cxx14
-rw-r--r--vcl/headless/svpinst.cxx15
3 files changed, 12 insertions, 21 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index f5dabae42ae7..202d63c0a84e 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef IOS
-
#include <sal/config.h>
#include <cstring>
@@ -267,6 +265,4 @@ bool SvpSalBitmap::Replace( const ::Color& /*rSearchColor*/, const ::Color& /*rR
return false;
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index ed8cdc656848..af454a9f0ba4 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -20,9 +20,7 @@
#include "headless/svpgdi.hxx"
#include "headless/svpbmp.hxx"
#include "headless/svpframe.hxx"
-#ifndef IOS
#include "headless/svpcairotextrender.hxx"
-#endif
#include "saldatabasic.hxx"
#include <vcl/sysdata.hxx>
@@ -87,8 +85,6 @@ namespace
}
}
-#ifndef IOS
-
bool SvpSalGraphics::blendBitmap( const SalTwoRect&, const SalBitmap& /*rBitmap*/ )
{
SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::blendBitmap case");
@@ -312,8 +308,6 @@ bool SvpSalGraphics::drawTransformedBitmap(
return true;
}
-#endif
-
void SvpSalGraphics::clipRegion(cairo_t* cr)
{
RectangleVector aRectangles;
@@ -396,8 +390,6 @@ void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
rDPIX = rDPIY = 96;
}
-#ifndef IOS
-
sal_uInt16 SvpSalGraphics::GetBitCount() const
{
if (CAIRO_FORMAT_A1 == cairo_image_surface_get_format(m_pSurface))
@@ -1219,8 +1211,6 @@ void SvpSalGraphics::invert(sal_uInt32 nPoints, const SalPoint* pPtAry, SalInver
invert(aPoly, nFlags);
}
-#endif
-
bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
{
return false;
@@ -1395,8 +1385,6 @@ css::uno::Any SvpSalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& /*
#endif // ENABLE_CAIRO_CANVAS
-#ifndef IOS
-
SystemGraphicsData SvpSalGraphics::GetGraphicsData() const
{
return SystemGraphicsData();
@@ -1413,6 +1401,4 @@ bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const
return false;
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index d5caadeefcaf..77b9ba580321 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -62,7 +62,7 @@ bool SvpSalInstance::isFrameAlive( const SalFrame* pFrame ) const
SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
-#ifndef ANDROID
+#if !defined(ANDROID) && !defined(IOS)
static void atfork_child()
{
@@ -82,11 +82,13 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) :
m_aTimeout.tv_usec = 0;
m_nTimeoutMS = 0;
+#ifndef IOS
m_pTimeoutFDS[0] = m_pTimeoutFDS[1] = -1;
CreateWakeupPipe(true);
+#endif
if( s_pDefaultInstance == nullptr )
s_pDefaultInstance = this;
-#ifndef ANDROID
+#if !defined(ANDROID) && !defined(IOS)
pthread_atfork(nullptr, nullptr, atfork_child);
#endif
}
@@ -95,10 +97,13 @@ SvpSalInstance::~SvpSalInstance()
{
if( s_pDefaultInstance == this )
s_pDefaultInstance = nullptr;
-
+#ifndef IOS
CloseWakeupPipe(true);
+#endif
}
+#ifndef IOS
+
void SvpSalInstance::CloseWakeupPipe(bool log)
{
if (m_pTimeoutFDS[0] != -1)
@@ -158,6 +163,8 @@ void SvpSalInstance::CreateWakeupPipe(bool log)
}
}
+#endif
+
void SvpSalInstance::PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, SalEvent nEvent)
{
{
@@ -206,7 +213,9 @@ void SvpSalInstance::deregisterFrame( SalFrame* pFrame )
void SvpSalInstance::Wakeup()
{
+#ifndef IOS
OSL_VERIFY(write (m_pTimeoutFDS[1], "", 1) == 1);
+#endif
}
bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )