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

Michael Meeks michael.meeks at collabora.com
Tue Nov 24 04:40:59 PST 2015


 include/vcl/scheduler.hxx    |    1 -
 vcl/inc/svdata.hxx           |    1 -
 vcl/source/app/scheduler.cxx |   15 +++++----------
 3 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 5a08d3fa47cfcfe89ccefd5023c95f6b3775ab4f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Nov 24 09:54:22 2015 +0000

    vcl: remove UpdateStack concept.
    
    Change-Id: I6d9b7de7c57349bfb9c75a35e63bcf1eac172fd2
    Reviewed-on: https://gerrit.libreoffice.org/20143
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index d1d8d83..9cd7fb8 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 b93a036..da1904c 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 138fbcd..a1f559d 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()


More information about the Libreoffice-commits mailing list