summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-08-10 12:00:53 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-07-13 12:10:28 +0200
commit00aa0892e7385cd8395dd39814077958be42e720 (patch)
treefb12e4f87b1466e7261640a4b3a597c9c3981eba /avmedia
parent11ffb51b758cd18a2c61d4bfa694f9f031ecd096 (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 'avmedia')
-rw-r--r--avmedia/source/framework/mediacontrol.cxx2
-rw-r--r--avmedia/source/framework/soundhandler.cxx2
-rw-r--r--avmedia/source/opengl/oglplayer.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index bde107a71e24..6c1f77ba7d43 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -114,7 +114,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
mpZoomToolBox->SetPaintTransparent( true );
}
- maIdle.SetPriority( TaskPriority::LOW );
+ maIdle.SetPriority( TaskPriority::HIGH_IDLE );
maIdle.SetInvokeHandler( LINK( this, MediaControl, implTimeoutHdl ) );
maIdle.Start();
}
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 94c940846f45..3f2ffcd9771f 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -221,7 +221,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
// Count this request and initialize self-holder against dying by uno ref count ...
m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
m_xPlayer->start();
- m_aUpdateIdle.SetPriority( TaskPriority::LOWER );
+ m_aUpdateIdle.SetPriority( TaskPriority::HIGH_IDLE );
m_aUpdateIdle.Start();
}
catch( css::uno::Exception& )
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 644a8db76d00..b691680f15e6 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -123,7 +123,7 @@ bool OGLPlayer::create( const OUString& rURL )
// Set timer
m_aTimer.SetTimeout(8); // is 125fps enough for anyone ?
- m_aTimer.SetPriority(TaskPriority::LOW);
+ m_aTimer.SetPriority(TaskPriority::HIGH_IDLE);
m_aTimer.SetInvokeHandler(LINK(this,OGLPlayer,TimerHandler));
return true;