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 /include | |
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 'include')
-rw-r--r-- | include/vcl/task.hxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx index 5148ac31bebf..e45fe3f5ae73 100644 --- a/include/vcl/task.hxx +++ b/include/vcl/task.hxx @@ -28,16 +28,14 @@ struct ImplSchedulerData; enum class TaskPriority { - HIGHEST = 0, - HIGH = 1, - RESIZE = 2, - REPAINT = 3, - MEDIUM = 3, - POST_PAINT = 4, - DEFAULT_IDLE = 5, - LOW = 6, - LOWER = 7, - LOWEST = 8 + HIGHEST, ///< These events should run very fast! + DEFAULT, ///< Default priority used, e.g. the default timer priority + HIGH_IDLE, ///< Important idle events to be run before processing drawing events + RESIZE, ///< Resize runs before repaint, so we won't paint twice + REPAINT, ///< All repaint events should go in here + POST_PAINT, ///< Everything running directly after painting + DEFAULT_IDLE, ///< Default idle priority + LOWEST ///< Low, very idle cleanup tasks }; class VCL_DLLPUBLIC Task |