[Libreoffice-commits] core.git: vcl/headless vcl/inc

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Thu May 16 11:55:19 UTC 2019


 vcl/headless/svpinst.cxx     |   14 --------------
 vcl/inc/headless/svpinst.hxx |    2 --
 2 files changed, 16 deletions(-)

New commits:
commit f2d660231bb8f574a6e352144e790764ebd9f608
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon May 13 14:22:20 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu May 16 14:35:28 2019 +0300

    Using the m_FeedbackFDs is now apparently necessary also on iOS
    
    The below commit message is relevant for the behaviour fixed by this
    change in the Collabora branch cp-6.0 (or core) and collabora-online-4
    (of online). The behaviour here in master is broken in different ways,
    though, and I am not entirely sure whether this change fixes anything
    here. But let's apply it here, too, for consistency.
    
    Until recently we had managed without them on iOS, but that changed
    with the recent "Unipoll" work, I think. (Without this change, the iOS
    app now runs into assertion failures early on. But note that this
    change is not enough to make it work fully again.)
    
    Change-Id: I09d25326ba73ce897da5c91f30530f5b3d5fd272

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 74900df2471f..02e332b92fbf 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -77,9 +77,7 @@ SvpSalInstance::SvpSalInstance( std::unique_ptr<SalYieldMutex> pMutex )
     m_nTimeoutMS            = 0;
 
     m_MainThread = osl::Thread::getCurrentIdentifier();
-#ifndef IOS
     CreateWakeupPipe(true);
-#endif
     if( s_pDefaultInstance == nullptr )
         s_pDefaultInstance = this;
 #if !defined(ANDROID) && !defined(IOS)
@@ -91,13 +89,9 @@ SvpSalInstance::~SvpSalInstance()
 {
     if( s_pDefaultInstance == this )
         s_pDefaultInstance = nullptr;
-#ifndef IOS
     CloseWakeupPipe(true);
-#endif
 }
 
-#ifndef IOS
-
 void SvpSalInstance::CloseWakeupPipe(bool log)
 {
     SvpSalYieldMutex *const pMutex(dynamic_cast<SvpSalYieldMutex*>(GetYieldMutex()));
@@ -153,8 +147,6 @@ void SvpSalInstance::CreateWakeupPipe(bool log)
     }
 }
 
-#endif
-
 void SvpSalInstance::TriggerUserEventProcessing()
 {
     Wakeup();
@@ -343,11 +335,7 @@ void SvpSalYieldMutex::doAcquire(sal_uInt32 const nLockCount)
                 m_bNoYieldLock = true;
                 bool const bEvents = pInst->DoYield(false, request == SvpRequest::MainThreadDispatchAllEvents);
                 m_bNoYieldLock = false;
-#ifdef IOS
-                (void)bEvents;
-#else
                 write(m_FeedbackFDs[1], &bEvents, sizeof(bool));
-#endif
             }
         }
         while (true);
@@ -507,11 +495,9 @@ bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
                 : SvpRequest::MainThreadDispatchOneEvent);
 
         bool bDidWork(false);
-#ifndef IOS
         // blocking read (for synchronisation)
         auto const nRet = read(pMutex->m_FeedbackFDs[0], &bDidWork, sizeof(bool));
         assert(nRet == 1); (void) nRet;
-#endif
         if (!bDidWork && bWait)
         {
             // block & release YieldMutex until the main thread does something
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index b552dd9a59bf..6ea4016aa980 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -73,9 +73,7 @@ private:
     // at least one subclass of SvpSalInstance (GTK3) that doesn't use them.
     friend class SvpSalInstance;
     // members for communication from main thread to non-main thread
-#ifndef IOS
     int                     m_FeedbackFDs[2];
-#endif
     osl::Condition          m_NonMainWaitingYieldCond;
     // members for communication from non-main thread to main thread
     bool                    m_bNoYieldLock = false; // accessed only on main thread


More information about the Libreoffice-commits mailing list