diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-27 23:40:11 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-13 12:10:27 +0200 |
commit | 52dfefec8da5d7f25c39218fd890cad6491728ab (patch) | |
tree | 1d1de94ab1e4215b51b6906133a483a863889057 /vcl | |
parent | 272026d70129603e1824b802a2a6920adcd09dc0 (diff) |
Run LO scheduler only via system timer
Change-Id: I5283f18aebcd6797ad35771ae8fc4a0f425ff924
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/idle.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/scheduler.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 14 |
4 files changed, 1 insertions, 25 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 844f564c425f..35edf1eec40e 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -327,7 +327,6 @@ struct ImplSchedulerContext SalTimer* mpSalTimer = nullptr; ///< interface to sal event loop / system timer sal_uInt64 mnTimerStart = 0; ///< start time of the timer sal_uInt64 mnTimerPeriod = SAL_MAX_UINT64; ///< current timer period - bool mbNeedsReschedule = false; ///< we need to reschedule }; struct ImplSVData diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx index 8038005a7d4f..4cbd3f8c0ed6 100644 --- a/vcl/source/app/idle.cxx +++ b/vcl/source/app/idle.cxx @@ -57,8 +57,6 @@ void Idle::Start() bool Idle::ReadyForSchedule( sal_uInt64 /* nTimeNow */ ) const { - ImplSVData *pSVData = ImplGetSVData(); - pSVData->maSchedCtx.mbNeedsReschedule = true; return true; } diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index 0fba128404fa..038641e274b2 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -173,13 +173,6 @@ bool Scheduler::GetDeterministicMode() return g_bDeterministicMode; } -bool Scheduler::HasPendingTasks() -{ - const ImplSchedulerContext &rSchedCtx = ImplGetSVData()->maSchedCtx; - return ( rSchedCtx.mbNeedsReschedule || ((rSchedCtx.mnTimerPeriod != InfiniteTimeoutMs) - && (tools::Time::GetSystemTicks() >= rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod )) ); -} - inline void Scheduler::UpdateMinPeriod( ImplSchedulerData * const pSchedulerData, const sal_uInt64 nTime, sal_uInt64 &nMinPeriod ) { @@ -247,7 +240,6 @@ bool Scheduler::ProcessTaskScheduling() sal_uInt64 nTime = tools::Time::GetSystemTicks(); if ( pSVData->mbDeInit || InfiniteTimeoutMs == rSchedCtx.mnTimerPeriod ) return false; - rSchedCtx.mbNeedsReschedule = false; if ( nTime < rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod ) { @@ -420,7 +412,6 @@ void Task::Start() mpSchedulerData->mbDelete = false; mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks(); - rSchedCtx.mbNeedsReschedule = true; } void Task::Stop() diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 82dc621b4ccc..e2732369bc42 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -470,10 +470,6 @@ inline bool ImplYield(bool i_bWait, bool i_bAllEvents, sal_uLong const nReleased SAL_INFO("vcl.schedule", "Enter ImplYield: " << (i_bWait ? "wait" : "no wait") << ": " << (i_bAllEvents ? "all events" : "one event") << ": " << nReleased); - // we handle pending task outside the system event loop, so don't wait - if (i_bWait && Scheduler::HasPendingTasks()) - i_bWait = false; - // TODO: there's a data race here on WNT only because ImplYield may be // called without SolarMutex; if we can get rid of LazyDelete (with VclPtr) // then the only remaining use of mnDispatchLevel is in OSX specific code @@ -487,24 +483,16 @@ inline bool ImplYield(bool i_bWait, bool i_bAllEvents, sal_uLong const nReleased i_bWait && !pSVData->maAppData.mbAppQuit, i_bAllEvents, nReleased); - SAL_INFO("vcl.schedule", "DoYield returns: " << bProcessedEvent ); - pSVData->maAppData.mnDispatchLevel--; DBG_TESTSOLARMUTEX(); // must be locked on return from Yield - if (nReleased == 0) // tdf#99383 don't run stuff from ReAcquireSolarMutex - { - // Process all Tasks - bProcessedEvent = Scheduler::ProcessTaskScheduling() || bProcessedEvent; - } - // flush lazy deleted objects if( pSVData->maAppData.mnDispatchLevel == 0 ) vcl::LazyDelete::flush(); SAL_INFO("vcl.schedule", "Leave ImplYield with return " << bProcessedEvent ); - return bProcessedEvent || Scheduler::HasPendingTasks(); + return bProcessedEvent; } bool Application::Reschedule( bool i_bAllEvents ) |