summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-01-04 12:06:42 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2017-01-17 16:08:47 +0100
commitfdc612619c1c133353026166206cea18c48089a6 (patch)
tree900ab53bc8d88ed4ab4b375e8a80136401bc3145 /vcl
parent17bb38262471cf68167fa11ad875c2785f43a341 (diff)
Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just keeps the "real" static Scheduler functions in the original Scheduler class. Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
Diffstat (limited to 'vcl')
-rw-r--r--vcl/backendtest/VisualBackendTest.cxx2
-rw-r--r--vcl/inc/saltimer.hxx11
-rw-r--r--vcl/inc/svdata.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx9
-rw-r--r--vcl/osx/salinst.cxx2
-rw-r--r--vcl/qa/cppunit/timer.cxx2
-rw-r--r--vcl/source/app/idle.cxx18
-rw-r--r--vcl/source/app/scheduler.cxx167
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/app/timer.cxx20
-rw-r--r--vcl/source/edit/textdata.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx4
-rw-r--r--vcl/source/window/dockwin.cxx4
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx2
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx2
18 files changed, 120 insertions, 137 deletions
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index fd6f27b2cb63..b2e620a25c1c 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -118,7 +118,7 @@ public:
, mpVDev(VclPtr<VirtualDevice>::Create())
{
maUpdateTimer.SetTimeoutHdl(LINK(this, VisualBackendTestWindow, updateHdl));
- maUpdateTimer.SetPriority(SchedulerPriority::REPAINT);
+ maUpdateTimer.SetPriority(TaskPriority::REPAINT);
if (mbAnimate)
{
maUpdateTimer.SetTimeout(1000.0);
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index c2e2c2300f30..4d8541801ef2 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -56,21 +56,20 @@ public:
}
};
-class Scheduler;
+class Task;
// Internal scheduler record holding intrusive linked list pieces
struct ImplSchedulerData
{
- ImplSchedulerData* mpNext; // Pointer to the next element in list
- Scheduler* mpScheduler; // Pointer to VCL Scheduler instance
- bool mbDelete; // Destroy this scheduler?
- bool mbInScheduler; // Scheduler currently processed?
+ ImplSchedulerData *mpNext; // Pointer to the next element in list
+ Task *mpTask; // Pointer to VCL Task instance
+ bool mbDelete; // Destroy this task?
+ bool mbInScheduler; // Task currently processed?
sal_uInt64 mnUpdateTime; // Last Update Time
void Invoke();
const char *GetDebugName() const;
- static ImplSchedulerData *GetMostImportantTask( bool bIdle, sal_uInt64 nTimeNow );
};
#endif // INCLUDED_VCL_INC_SALTIMER_HXX
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 824daa8f35a0..e3afd5bf1a8d 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -24,7 +24,6 @@
#include <tools/fldunit.hxx>
#include <unotools/options.hxx>
-#include <vcl/idle.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/lang/XComponent.hpp>
@@ -46,6 +45,7 @@ struct ImplConfigData;
class ImplDirectFontSubstitution;
struct ImplHotKey;
struct ImplEventHook;
+struct ImplSchedulerData;
class Point;
class ResMgr;
class ImplAccelManager;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 61fb63df8fd7..904392644ac9 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -20,6 +20,7 @@
#include "openglgdiimpl.hxx"
#include <vcl/gradient.hxx>
+#include <vcl/idle.hxx>
#include <salframe.hxx>
#include "salvd.hxx"
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -54,13 +55,13 @@ public:
, m_pImpl( pImpl )
{
// We don't want to be swapping before we've painted.
- SetPriority( SchedulerPriority::POST_PAINT );
+ SetPriority( TaskPriority::POST_PAINT );
}
virtual void Invoke() override
{
m_pImpl->doFlush();
- SetPriority( SchedulerPriority::HIGHEST );
+ SetPriority( TaskPriority::HIGHEST );
Stop();
}
};
@@ -150,7 +151,7 @@ void OpenGLSalGraphicsImpl::Init()
maOffscreenTex.GetHeight() != GetHeight() )
{
// We don't want to be swapping before we've painted.
- mpFlush->SetPriority( SchedulerPriority::POST_PAINT );
+ mpFlush->SetPriority( TaskPriority::POST_PAINT );
if( maOffscreenTex && // don't work to release empty textures
mpContext.is() ) // valid context
@@ -520,7 +521,7 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture()
maOffscreenTex.GetHeight() != GetHeight() )
{
VCL_GL_INFO( "re-size offscreen texture " << maOffscreenTex.Id() );
- mpFlush->SetPriority( SchedulerPriority::POST_PAINT );
+ mpFlush->SetPriority( TaskPriority::POST_PAINT );
mpContext->ReleaseFramebuffer( maOffscreenTex );
maOffscreenTex = OpenGLTexture();
}
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 4cd82d66bd94..0bac909726b6 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -109,7 +109,7 @@ void AquaSalInstance::delayedSettingsChanged( bool bInvalidate )
{
osl::Guard< comphelper::SolarMutex > aGuard( *mpSalYieldMutex );
AquaDelayedSettingsChanged* pIdle = new AquaDelayedSettingsChanged( bInvalidate );
- pIdle->SetPriority( SchedulerPriority::MEDIUM );
+ pIdle->SetPriority( TaskPriority::MEDIUM );
pIdle->Start();
}
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 3bf387dcb950..47439ad19e8b 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -102,7 +102,7 @@ public:
explicit IdleBool( bool &rBool ) :
Idle(), mrBool( rBool )
{
- SetPriority( SchedulerPriority::LOWEST );
+ SetPriority( TaskPriority::LOWEST );
Start();
mrBool = false;
}
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index dea322fd5db9..52b8d980218f 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -27,32 +27,32 @@ void Idle::Invoke()
Idle& Idle::operator=( const Idle& rIdle )
{
- Scheduler::operator=(rIdle);
+ Task::operator=(rIdle);
maIdleHdl = rIdle.maIdleHdl;
return *this;
}
-Idle::Idle( const sal_Char *pDebugName ) : Scheduler( pDebugName )
+Idle::Idle( const sal_Char *pDebugName ) : Task( pDebugName )
{
}
-Idle::Idle( const Idle& rIdle ) : Scheduler(rIdle)
+Idle::Idle( const Idle& rIdle ) : Task(rIdle)
{
maIdleHdl = rIdle.maIdleHdl;
}
void Idle::Start()
{
- Scheduler::Start();
+ Task::Start();
sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs;
if (Scheduler::GetDeterministicMode())
{
switch (mePriority)
{
- case SchedulerPriority::LOW:
- case SchedulerPriority::LOWER:
- case SchedulerPriority::LOWEST:
+ case TaskPriority::LOW:
+ case TaskPriority::LOWER:
+ case TaskPriority::LOWEST:
nPeriod = Scheduler::InfiniteTimeoutMs;
break;
default:
@@ -60,7 +60,7 @@ void Idle::Start()
}
}
- Scheduler::ImplStartTimer(nPeriod);
+ Task::StartTimer(nPeriod);
}
bool Idle::ReadyForSchedule( bool bIdle, sal_uInt64 /* nTimeNow */ ) const
@@ -77,7 +77,7 @@ bool Idle::IsIdle() const
sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 /* nTimeNow */ ) const
{
assert(false); // idles currently don't hit this.
- return ImmediateTimeoutMs;
+ return Scheduler::ImmediateTimeoutMs;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 63c0c5fcafc6..3a62f3dd61ef 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -26,7 +26,6 @@
namespace {
const sal_uInt64 MaximumTimeoutMs = 1000 * 60; // 1 minute
-void InitSystemTimer(ImplSVData* pSVData);
}
void ImplSchedulerData::Invoke()
@@ -38,49 +37,17 @@ void ImplSchedulerData::Invoke()
return;
// prepare Scheduler Object for deletion after handling
- mpScheduler->SetDeletionFlags();
+ mpTask->SetDeletionFlags();
// tdf#92036 Reset the period to avoid re-firing immediately.
- mpScheduler->mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
+ mpTask->mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
// invoke it
mbInScheduler = true;
- mpScheduler->Invoke();
+ mpTask->Invoke();
mbInScheduler = false;
}
-ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bIdle, sal_uInt64 nTimeNow )
-{
- ImplSVData* pSVData = ImplGetSVData();
- ImplSchedulerData *pMostUrgent = nullptr;
-
- for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
- {
- if ( !pSchedulerData->mpScheduler || pSchedulerData->mbDelete || pSchedulerData->mbInScheduler ||
- !pSchedulerData->mpScheduler->ReadyForSchedule( bIdle, nTimeNow ) ||
- !pSchedulerData->mpScheduler->IsActive())
- continue;
- if (!pMostUrgent)
- pMostUrgent = pSchedulerData;
- else
- {
- // Find the highest priority.
- // If the priority of the current task is higher (numerical value is lower) than
- // the priority of the most urgent, the current task gets the new most urgent.
- if ( pSchedulerData->mpScheduler->GetPriority() < pMostUrgent->mpScheduler->GetPriority() )
- pMostUrgent = pSchedulerData;
- }
- }
-
- return pMostUrgent;
-}
-
-void Scheduler::SetDeletionFlags()
-{
- mpSchedulerData->mbDelete = true;
- mbActive = false;
-}
-
void Scheduler::ImplDeInitScheduler()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -95,10 +62,10 @@ void Scheduler::ImplDeInitScheduler()
do
{
ImplSchedulerData* pTempSchedulerData = pSchedulerData;
- if ( pSchedulerData->mpScheduler )
+ if ( pSchedulerData->mpTask )
{
- pSchedulerData->mpScheduler->mbActive = false;
- pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
+ pSchedulerData->mpTask->mbActive = false;
+ pSchedulerData->mpTask->mpSchedulerData = nullptr;
}
pSchedulerData = pSchedulerData->mpNext;
delete pTempSchedulerData;
@@ -132,7 +99,12 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce)
DBG_TESTSOLARMUTEX();
- InitSystemTimer(pSVData);
+ if (!pSVData->mpSalTimer)
+ {
+ pSVData->mnTimerPeriod = MaximumTimeoutMs;
+ pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
+ pSVData->mpSalTimer->SetCallback(Scheduler::CallbackTaskScheduling);
+ }
if ( !nMS )
nMS = 1;
@@ -145,25 +117,6 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce)
}
}
-namespace {
-
-/**
-* Initialize the platform specific timer on which all the
-* platform independent timers are built
-*/
-void InitSystemTimer(ImplSVData* pSVData)
-{
- assert(pSVData != nullptr);
- if (!pSVData->mpSalTimer)
- {
- pSVData->mnTimerPeriod = MaximumTimeoutMs;
- pSVData->mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
- pSVData->mpSalTimer->SetCallback(Scheduler::CallbackTaskScheduling);
- }
-}
-
-}
-
void Scheduler::CallbackTaskScheduling( bool bIdle )
{
// this function is for the saltimer callback
@@ -172,17 +125,39 @@ void Scheduler::CallbackTaskScheduling( bool bIdle )
bool Scheduler::ProcessTaskScheduling( bool bIdle )
{
- ImplSchedulerData* pSchedulerData;
+ ImplSVData *pSVData = ImplGetSVData();
+ if ( pSVData->mbDeInit )
+ return false;
+ ImplSchedulerData *pMostUrgent = nullptr;
sal_uInt64 nTime = tools::Time::GetSystemTicks();
DBG_TESTSOLARMUTEX();
- if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bIdle, nTime)))
+ for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData;
+ pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
+ {
+ if ( !pSchedulerData->mpTask || pSchedulerData->mbDelete || pSchedulerData->mbInScheduler ||
+ !pSchedulerData->mpTask->ReadyForSchedule( bIdle, nTime ) ||
+ !pSchedulerData->mpTask->IsActive())
+ continue;
+ if (!pMostUrgent)
+ pMostUrgent = pSchedulerData;
+ else
+ {
+ // Find the highest priority.
+ // If the priority of the current task is higher (numerical value is lower) than
+ // the priority of the most urgent, the current task gets the new most urgent.
+ if ( pSchedulerData->mpTask->GetPriority() < pMostUrgent->mpTask->GetPriority() )
+ pMostUrgent = pSchedulerData;
+ }
+ }
+
+ if ( pMostUrgent )
{
- SAL_INFO("vcl.schedule", "Invoke task " << pSchedulerData->GetDebugName());
+ SAL_INFO("vcl.schedule", "Invoke task " << pMostUrgent->GetDebugName());
- pSchedulerData->mnUpdateTime = nTime;
- pSchedulerData->Invoke();
+ pMostUrgent->mnUpdateTime = nTime;
+ pMostUrgent->Invoke();
return true;
}
else
@@ -225,8 +200,8 @@ sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
pPrevSchedulerData->mpNext = pSchedulerData->mpNext;
else
pSVData->mpFirstSchedulerData = pSchedulerData->mpNext;
- if ( pSchedulerData->mpScheduler )
- pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
+ if ( pSchedulerData->mpTask )
+ pSchedulerData->mpTask->mpSchedulerData = nullptr;
pNext = pSchedulerData->mpNext;
delete pSchedulerData;
}
@@ -234,11 +209,11 @@ sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
{
if (!pSchedulerData->mbInScheduler)
{
- if ( !pSchedulerData->mpScheduler->IsIdle() )
+ if ( !pSchedulerData->mpTask->IsIdle() )
{
sal_uInt64 nOldMinPeriod = nMinPeriod;
- nMinPeriod = pSchedulerData->mpScheduler->UpdateMinPeriod(
- nOldMinPeriod, nTime );
+ nMinPeriod = pSchedulerData->mpTask->UpdateMinPeriod(
+ nOldMinPeriod, nTime );
SAL_INFO("vcl.schedule", "Have active timer '" <<
pSchedulerData->GetDebugName() <<
"' update min period from " << nOldMinPeriod <<
@@ -282,7 +257,24 @@ sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
return nMinPeriod;
}
-void Scheduler::Start()
+const char *ImplSchedulerData::GetDebugName() const
+{
+ return mpTask && mpTask->GetDebugName() ?
+ mpTask->GetDebugName() : "unknown";
+}
+
+void Task::StartTimer( sal_uInt64 nMS )
+{
+ Scheduler::ImplStartTimer( nMS, false );
+}
+
+void Task::SetDeletionFlags()
+{
+ mpSchedulerData->mbDelete = true;
+ mbActive = false;
+}
+
+void Task::Start()
{
ImplSVData *const pSVData = ImplGetSVData();
if (pSVData->mbDeInit)
@@ -297,9 +289,9 @@ void Scheduler::Start()
if ( !mpSchedulerData )
{
- // insert Scheduler
+ // insert Task
mpSchedulerData = new ImplSchedulerData;
- mpSchedulerData->mpScheduler = this;
+ mpSchedulerData->mpTask = this;
mpSchedulerData->mbInScheduler = false;
// insert last due to SFX!
@@ -320,7 +312,7 @@ void Scheduler::Start()
mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
}
-void Scheduler::Stop()
+void Task::Stop()
{
mbActive = false;
@@ -328,52 +320,45 @@ void Scheduler::Stop()
mpSchedulerData->mbDelete = true;
}
-Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
+Task& Task::operator=( const Task& rTask )
{
if ( IsActive() )
Stop();
mbActive = false;
- mePriority = rScheduler.mePriority;
+ mePriority = rTask.mePriority;
- if ( rScheduler.IsActive() )
+ if ( rTask.IsActive() )
Start();
return *this;
}
-Scheduler::Scheduler(const sal_Char *pDebugName):
+Task::Task(const sal_Char *pDebugName):
mpSchedulerData(nullptr),
mpDebugName(pDebugName),
- mePriority(SchedulerPriority::HIGH),
+ mePriority(TaskPriority::HIGH),
mbActive(false)
{
}
-Scheduler::Scheduler( const Scheduler& rScheduler ):
+Task::Task( const Task& rTask ):
mpSchedulerData(nullptr),
- mpDebugName(rScheduler.mpDebugName),
- mePriority(rScheduler.mePriority),
+ mpDebugName(rTask.mpDebugName),
+ mePriority(rTask.mePriority),
mbActive(false)
{
- if ( rScheduler.IsActive() )
+ if ( rTask.IsActive() )
Start();
}
-Scheduler::~Scheduler()
+Task::~Task()
{
if ( mpSchedulerData )
{
mpSchedulerData->mbDelete = true;
- mpSchedulerData->mpScheduler = nullptr;
+ mpSchedulerData->mpTask = nullptr;
}
}
-const char *ImplSchedulerData::GetDebugName() const
-{
- return mpScheduler && mpScheduler->GetDebugName() ?
- mpScheduler->GetDebugName() : "unknown";
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a6a5430c36d3..a7c35545e17c 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -459,7 +459,7 @@ void Application::Execute()
pSVData->maAppData.mnEventTestLimit = 50;
pSVData->maAppData.mpEventTestingIdle = new Idle("eventtesting");
pSVData->maAppData.mpEventTestingIdle->SetIdleHdl(LINK(&(pSVData->maAppData), ImplSVAppData, VclEventTestingHdl));
- pSVData->maAppData.mpEventTestingIdle->SetPriority(SchedulerPriority::MEDIUM);
+ pSVData->maAppData.mpEventTestingIdle->SetPriority(TaskPriority::MEDIUM);
pSVData->maAppData.mpEventTestInput = new SvFileStream("eventtesting", StreamMode::READ);
pSVData->maAppData.mpEventTestingIdle->Start();
}
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 8f52e174e5aa..96485ae90ebd 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -45,7 +45,7 @@ sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow )
{
sal_uInt64 nWakeupTime = mpSchedulerData->mnUpdateTime + mnTimeout;
if( nWakeupTime <= nTimeNow )
- return ImmediateTimeoutMs;
+ return Scheduler::ImmediateTimeoutMs;
else
{
sal_uInt64 nSleepTime = nWakeupTime - nTimeNow;
@@ -54,15 +54,15 @@ sal_uInt64 Timer::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow )
}
Timer::Timer(const sal_Char *pDebugName) :
- Scheduler(pDebugName),
- mnTimeout(ImmediateTimeoutMs),
+ Task(pDebugName),
+ mnTimeout(Scheduler::ImmediateTimeoutMs),
mbAuto(false)
{
- mePriority = SchedulerPriority::HIGHEST;
+ mePriority = TaskPriority::HIGHEST;
}
Timer::Timer( const Timer& rTimer ) :
- Scheduler(rTimer),
+ Task(rTimer),
mnTimeout(rTimer.mnTimeout),
mbAuto(rTimer.mbAuto)
{
@@ -76,8 +76,8 @@ void Timer::Invoke()
void Timer::Start()
{
- Scheduler::Start();
- Scheduler::ImplStartTimer(mnTimeout);
+ Task::Start();
+ Task::StartTimer( mnTimeout );
}
void Timer::SetTimeout( sal_uInt64 nNewTimeout )
@@ -85,14 +85,12 @@ void Timer::SetTimeout( sal_uInt64 nNewTimeout )
mnTimeout = nNewTimeout;
// If timer is active, then renew clock.
if ( mbActive )
- {
- Scheduler::ImplStartTimer(mnTimeout);
- }
+ StartTimer( mnTimeout );
}
Timer& Timer::operator=( const Timer& rTimer )
{
- Scheduler::operator=(rTimer);
+ Task::operator=(rTimer);
maTimeoutHdl = rTimer.maTimeoutHdl;
mnTimeout = rTimer.mnTimeout;
mbAuto = rTimer.mbAuto;
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 77abfb0c98b5..ceb42d053019 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -275,7 +275,7 @@ IdleFormatter::IdleFormatter()
{
mpView = nullptr;
mnRestarts = 0;
- SetPriority(SchedulerPriority::HIGH);
+ SetPriority(TaskPriority::HIGH);
}
IdleFormatter::~IdleFormatter()
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 127557058313..1f97adbb0114 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -88,11 +88,11 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
SetBackground( GetSettings().GetStyleSettings().GetFaceColor() );
maDockIdle.SetIdleHdl( LINK( this, ImplDockFloatWin2, DockTimerHdl ) );
- maDockIdle.SetPriority( SchedulerPriority::MEDIUM );
+ maDockIdle.SetPriority( TaskPriority::MEDIUM );
maDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maDockIdle" );
maEndDockIdle.SetIdleHdl( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) );
- maEndDockIdle.SetPriority( SchedulerPriority::MEDIUM );
+ maEndDockIdle.SetPriority( TaskPriority::MEDIUM );
maEndDockIdle.SetDebugName( "vcl::ImplDockFloatWin2 maEndDockIdle" );
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index b5b543fc3851..4c21f4733487 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -103,7 +103,7 @@ ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
SetBackground();
maDockIdle.SetIdleHdl( LINK( this, ImplDockFloatWin, DockTimerHdl ) );
- maDockIdle.SetPriority( SchedulerPriority::MEDIUM );
+ maDockIdle.SetPriority( TaskPriority::MEDIUM );
maDockIdle.SetDebugName( "vcl::ImplDockFloatWin maDockIdle" );
}
@@ -308,7 +308,7 @@ void DockingWindow::ImplInitDockingWindowData()
mpDialogParent = nullptr;
//To-Do, reuse maResizeTimer
- maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
+ maLayoutIdle.SetPriority(TaskPriority::RESIZE);
maLayoutIdle.SetIdleHdl( LINK( this, DockingWindow, ImplHandleLayoutTimerHdl ) );
maLayoutIdle.SetDebugName( "vcl::DockingWindow maLayoutIdle" );
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 5c03502b54dd..82bd7ef6e13b 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -85,7 +85,7 @@ SystemWindow::SystemWindow(WindowType nType)
mpWindowImpl->mnActivateMode = ActivateModeFlags::GrabFocus;
//To-Do, reuse maResizeTimer
- maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
+ maLayoutIdle.SetPriority(TaskPriority::RESIZE);
maLayoutIdle.SetIdleHdl( LINK( this, SystemWindow, ImplHandleLayoutTimerHdl ) );
maLayoutIdle.SetDebugName( "vcl::SystemWindow maLayoutIdle" );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index dde50d482498..c5a67244b5b6 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1408,7 +1408,7 @@ void ToolBox::ImplInitToolBoxData()
mpStatusListener = new VclStatusListener<ToolBox>(this, ".uno:ImageOrientation");
mpIdle = new Idle("vcl::ToolBox maIdle update");
- mpIdle->SetPriority( SchedulerPriority::RESIZE );
+ mpIdle->SetPriority( TaskPriority::RESIZE );
mpIdle->SetIdleHdl( LINK( this, ToolBox, ImplUpdateHdl ) );
// set timeout and handler for dropdown items
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bd1401bb04ab..2757800751f5 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -814,10 +814,10 @@ ImplFrameData::ImplFrameData( vcl::Window *pWindow )
mbInSysObjFocusHdl = false;
mbInSysObjToTopHdl = false;
mbSysObjFocus = false;
- maPaintIdle.SetPriority( SchedulerPriority::REPAINT );
+ maPaintIdle.SetPriority( TaskPriority::REPAINT );
maPaintIdle.SetIdleHdl( LINK( pWindow, vcl::Window, ImplHandlePaintHdl ) );
maPaintIdle.SetDebugName( "vcl::Window maPaintIdle" );
- maResizeIdle.SetPriority( SchedulerPriority::RESIZE );
+ maResizeIdle.SetPriority( TaskPriority::RESIZE );
maResizeIdle.SetIdleHdl( LINK( pWindow, vcl::Window, ImplHandleResizeTimerHdl ) );
maResizeIdle.SetDebugName( "vcl::Window maResizeIdle" );
mbInternalDragGestureRecognizer = false;
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index a8fb4d143acf..b95436c84522 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -1319,7 +1319,7 @@ void PrinterUpdate::update(SalGenericInstance &rInstance)
else if( ! pPrinterUpdateIdle )
{
pPrinterUpdateIdle = new Idle("PrinterUpdateTimer");
- pPrinterUpdateIdle->SetPriority( SchedulerPriority::LOWEST );
+ pPrinterUpdateIdle->SetPriority( TaskPriority::LOWEST );
pPrinterUpdateIdle->SetIdleHdl( LINK( nullptr, PrinterUpdate, UpdateTimerHdl ) );
pPrinterUpdateIdle->Start();
}
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 2cf072a01d5d..af26a10f22ed 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -503,7 +503,7 @@ GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
//typically this only gets called after the menu has been customized on the
//next idle slot, in the normal case of a new menubar SetFrame is called
//directly long before this idle would get called.
- maUpdateMenuBarIdle.SetPriority(SchedulerPriority::HIGHEST);
+ maUpdateMenuBarIdle.SetPriority(TaskPriority::HIGHEST);
maUpdateMenuBarIdle.SetIdleHdl(LINK(this, GtkSalMenu, MenuBarHierarchyChangeHandler));
maUpdateMenuBarIdle.SetDebugName("Native Gtk Menu Update Idle");
}