From 12dcf5e6e770b1933252a1f919663ba45ded4cdf Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 13 Nov 2015 09:56:53 +0000 Subject: slideshow: cleanup main-loop usage, post-yield listeners, etc. This removes several attempts at reducing jitter in slideshow animations. Now we have high-resolution (ie. not clamped to 10ms) timers on Windows and a cleaner and simpler main-loop, we should be able to use generic timer code-paths for all of this. This also allows us to further cleanup and simplify the main-loop removing the now redundent post-yield handler concept. If there is a short enough timeout, we will take just 1ms of delay before executing a short timer anyway. Also removed some lingering comments from an old attempt to boost priorities which broken audio playback. Tested: tdf#32861 - still works, audio still plays, no new jitter in animations that I tested. Change-Id: Iadc5e2a48828a18a599a86a8df14cb2b75dd425e Reviewed-on: https://gerrit.libreoffice.org/19947 Tested-by: Jenkins Reviewed-by: Michael Meeks --- include/vcl/svapp.hxx | 66 --------------------------------------------------- 1 file changed, 66 deletions(-) (limited to 'include') diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index a129c3f53478..f3521b0e7d86 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -460,8 +460,6 @@ public: @see Quit, Reschedule, Yield, EndYield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void Execute(); @@ -469,8 +467,6 @@ public: @see Execute, Reschedule, Yield, EndYield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void Quit(); @@ -482,8 +478,6 @@ public: @see Execute, Quit, Yield, EndYield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void Reschedule( bool bAllEvents = false ); @@ -491,8 +485,6 @@ public: @see Execute, Quit, Reschedule, EndYield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void Yield(); @@ -500,8 +492,6 @@ public: @see Execute, Quit, Reschedule, Yield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void EndYield(); @@ -520,8 +510,6 @@ public: @see Execute, Quit, Reschedule, Yield, EndYield, GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static comphelper::SolarMutex& GetSolarMutex(); @@ -531,8 +519,6 @@ public: @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static oslThreadIdentifier GetMainThreadIdentifier(); @@ -545,8 +531,6 @@ public: @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, GetMainThreadIdentifier, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static sal_uLong ReleaseSolarMutex(); @@ -557,59 +541,9 @@ public: @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, GetMainThreadIdentifier, ReleaseSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, AddPostYieldListener, - RemovePostYieldListener */ static void AcquireSolarMutex( sal_uLong nCount ); - /** @brief Enables "no yield" mode - - "No yield" mode prevents Yield() from waiting for events. - - @remarks This was originally implemented in OOo bug 98792 to improve - Impress slideshows. - - @see DisableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, - GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - DisableNoYield, AddPostYieldListener, RemovePostYieldListener - */ - static void EnableNoYieldMode(); - - /** @brief Disables "no yield" mode - - "No yield" mode prevents Yield() from waiting for events. - - @remarks This was originally implemented in OOo bug 98792 to improve - Impress slideshows. - - @see EnableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, - GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYield, AddPostYieldListener, RemovePostYieldListener - */ - - static void DisableNoYieldMode(); - - /** Add a listener for yield events - - @param i_rListener Listener to add - - @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, - GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - EnableNoYieldMode, DisableNoYieldMode, RemovePostYieldListener - */ - static void AddPostYieldListener( const Link& i_rListener ); - - /** Remove listener for yield events - - @param i_rListener Listener to remove - - @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex, - GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex, - AddPostYieldListener, EnableNoYieldMode, DisableNoYieldMode - */ - static void RemovePostYieldListener( const Link& i_rListener ); - - /** Queries whether the application is in "main", i.e. not yet in the event loop -- cgit