diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-08-10 12:00:53 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-13 12:10:28 +0200 |
commit | 00aa0892e7385cd8395dd39814077958be42e720 (patch) | |
tree | fb12e4f87b1466e7261640a4b3a597c9c3981eba /svx | |
parent | 11ffb51b758cd18a2c61d4bfa694f9f031ecd096 (diff) |
Reorganize Scheduler priority classes
This is based on glibs classification of tasks, but while glib uses
an int for more fine grained priority, we stay with our enum.
1. Timers start with DEFAULT priority, which directly corresponds
with the previous HIGH priority
2. Idles start with DEFAULT_IDLE priority instead of the previous
HIGH priority, so idle default becomes "really run when idle".
As RESIZE and REPAINT are special, and the DEFAULTS are set, there
is just one primary decision for the programmer: should my idle
run before paint (AKA HIGH_IDLE)?
If we really need a more fine-grained classification, we can add it
later, or also switch to a real int. As a result, this drops many
classifications from the code and drastically changes behaviour,
AKA a mail merge from KDE is now as fast as Gtk+ again.
Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 1 | ||||
-rw-r--r-- | svx/source/sdr/contact/objectcontactofpageview.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofpageobj.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/event/eventhandler.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdibrow.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 1 |
7 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 729252a46e6d..13726e6fb7db 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -287,7 +287,6 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * Resize(); - aUpdateIdle.SetPriority( TaskPriority::LOW ); aUpdateIdle.SetInvokeHandler( LINK( this, SvxSuperContourDlg, UpdateHdl ) ); aCreateIdle.SetPriority( TaskPriority::RESIZE ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 4c9325902254..638b44951f2f 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -204,7 +204,6 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window m_pCbbTarget->Disable(); pOwnData->bExecState = false; - pOwnData->aIdle.SetPriority( TaskPriority::LOW ); pOwnData->aIdle.SetInvokeHandler( LINK( this, SvxIMapDlg, UpdateHdl ) ); m_pTbxIMapDlg1->EnableItem( mnActiveId, false ); diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 77be097549a4..a010bcba7bfa 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -61,7 +61,7 @@ namespace sdr setPreviewRenderer(static_cast<SdrPaintView&>(rPageWindow.GetPageView().GetView()).IsPreviewRenderer()); // init timer - SetPriority(TaskPriority::HIGH); + SetPriority(TaskPriority::HIGH_IDLE); Stop(); } diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index 3c33a3ee8e93..b54e19145e8e 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -84,7 +84,7 @@ PagePrimitiveExtractor::PagePrimitiveExtractor( setPreviewRenderer(true); // init timer - SetPriority(TaskPriority::HIGH); + SetPriority(TaskPriority::HIGH_IDLE); Stop(); } diff --git a/svx/source/sdr/event/eventhandler.cxx b/svx/source/sdr/event/eventhandler.cxx index 9511c623a1a2..8d0e29592c92 100644 --- a/svx/source/sdr/event/eventhandler.cxx +++ b/svx/source/sdr/event/eventhandler.cxx @@ -81,7 +81,7 @@ namespace sdr TimerEventHandler::TimerEventHandler() { - SetPriority(TaskPriority::HIGH); + SetPriority(TaskPriority::HIGH_IDLE); Stop(); } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index c692fd14aaec..ba60711d711f 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1085,7 +1085,7 @@ void SdrItemBrowser::SetDirty() { if (!bDirty) { bDirty = true; - aIdle.SetPriority(TaskPriority::HIGH); + aIdle.SetPriority(TaskPriority::HIGH_IDLE); aIdle.Start(); } } diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 0759e6c17f6f..3627a470d7f8 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -120,7 +120,6 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString& SetSpinSize( 1 ); } - maIdle.SetPriority( TaskPriority::LOW ); maIdle.SetInvokeHandler( LINK( this, ImplGrafMetricField, ImplModifyHdl ) ); } |