diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-11-24 09:54:22 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-11-24 12:40:29 +0000 |
commit | 5a08d3fa47cfcfe89ccefd5023c95f6b3775ab4f (patch) | |
tree | 66ec815309b2f9b92895093cad49b1f020cd8a8e | |
parent | 745751e32de28a6cc318f40074855d547b0d5da5 (diff) |
vcl: remove UpdateStack concept.
Change-Id: I6d9b7de7c57349bfb9c75a35e63bcf1eac172fd2
Reviewed-on: https://gerrit.libreoffice.org/20143
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | include/vcl/scheduler.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/scheduler.cxx | 15 |
3 files changed, 5 insertions, 12 deletions
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx index d1d8d83fe6ff..9cd7fb845d4f 100644 --- a/include/vcl/scheduler.hxx +++ b/include/vcl/scheduler.hxx @@ -31,7 +31,6 @@ struct ImplSchedulerData bool mbDelete; // Destroy this scheduler? bool mbInScheduler; // Scheduler currently processed? sal_uInt64 mnUpdateTime; // Last Update Time - sal_uInt32 mnUpdateStack; // Update Stack void Invoke(); diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index b93a0361b67e..da1904c670cc 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -328,7 +328,6 @@ struct ImplSVData SalSystem* mpSalSystem; // SalSystem interface ResMgr* mpResMgr; // SV-Resource-Manager sal_uInt64 mnTimerPeriod; // current timer period - sal_uInt32 mnUpdateStack; // Scheduler on stack ImplSVAppData maAppData; // indepen data for class Application ImplSVGDIData maGDIData; // indepen data for Output classes ImplSVWinData maWinData; // indepen data for Windows classes diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index 138fbcdcb3fa..a1f559daf08d 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -48,8 +48,9 @@ ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimerOnly ) for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext ) { - if ( !pSchedulerData->mpScheduler || pSchedulerData->mbDelete || pSchedulerData->mnUpdateStack >= pSVData->mnUpdateStack - || !pSchedulerData->mpScheduler->ReadyForSchedule( bTimerOnly ) || !pSchedulerData->mpScheduler->IsActive()) + if ( !pSchedulerData->mpScheduler || pSchedulerData->mbDelete || + !pSchedulerData->mpScheduler->ReadyForSchedule( bTimerOnly ) || + !pSchedulerData->mpScheduler->IsActive()) continue; if (!pMostUrgent) pMostUrgent = pSchedulerData; @@ -125,10 +126,8 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce) if ( !nMS ) nMS = 1; - // Update timeout only when not in timer handler and - // only if smaller timeout, to avoid skipping. - if (bForce || (!pSVData->mnUpdateStack && - nMS < pSVData->mnTimerPeriod)) + // Only if smaller timeout, to avoid skipping. + if (bForce || nMS < pSVData->mnTimerPeriod) { pSVData->mnTimerPeriod = nMS; pSVData->mpSalTimer->Start(nMS); @@ -166,7 +165,6 @@ void Scheduler::ProcessTaskScheduling( bool bTimer ) ImplSVData* pSVData = ImplGetSVData(); sal_uInt64 nTime = tools::Time::GetSystemTicks(); sal_uInt64 nMinPeriod = MaximumTimeoutMs; - pSVData->mnUpdateStack++; // tdf#91727 - NB. bTimer is ultimately not used if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer))) @@ -198,7 +196,6 @@ void Scheduler::ProcessTaskScheduling( bool bTimer ) } else { - pSchedulerData->mnUpdateStack = 0; nMinPeriod = pSchedulerData->mpScheduler->UpdateMinPeriod( nMinPeriod, nTime ); pPrevSchedulerData = pSchedulerData; pSchedulerData = pSchedulerData->mpNext; @@ -216,7 +213,6 @@ void Scheduler::ProcessTaskScheduling( bool bTimer ) { Scheduler::ImplStartTimer(nMinPeriod, true); } - pSVData->mnUpdateStack--; } void Scheduler::Start() @@ -253,7 +249,6 @@ void Scheduler::Start() } mpSchedulerData->mbDelete = false; mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks(); - mpSchedulerData->mnUpdateStack = pSVData->mnUpdateStack; } void Scheduler::Stop() |