summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-01-08 17:37:20 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-14 08:37:02 +0100
commit0774d315d3151c2cf8b6c01ab1f8c76a52fbb742 (patch)
treead486cb4fba3be38f8514cf1bec5966455b2b0b0
parentecee82e2368002fc3cabc00ec89ec7d757c48c64 (diff)
tdf#128353 sd slideshow: fix handling of animgifs on slower machines
Regression from commit 3e0092031b73bad107e3122d5d4be2f5bd487744 (tdf#112318 sd opengl: fix lack of initial animation, 2019-04-05), the problem was that in case a timer adds itself to the end of the scheduler queue during Scheduler::ProcessEventsToIdle(), then the idle trigger in SlideshowImpl::updateSlideShow() will never finish. The intention of invoking idles is to help vcl backends which do the actual painting in an idle, so actually it's enough to only process tasks which are already scheduled. That is enough for skia/gtk3/etc and avoids the problem with the animgifs. This is only a problem in debug builds or on slower machines: the animgif from the bugdoc wants to play a frame every 40ms, so in case processing the current tasks finishes faster than that, then the problem was not visible. (cherry picked from commit c33dd70aa7a6a5dc28b99f8af123548b02a77884) Change-Id: I7487cb9a79e7e5acc0b816eb4744a04559ae26ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109107 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8d518c65011d..2af2326e612e 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1678,7 +1678,8 @@ void SlideshowImpl::updateSlideShow()
if (::basegfx::fTools::equalZero(fUpdate))
{
// Make sure idle tasks don't starve when we don't have to wait.
- Scheduler::ProcessEventsToIdle();
+ // Don't process any events generated after invoking the function.
+ Application::Reschedule(/*bHandleAllCurrentEvents=*/true);
}
else
{