[Libreoffice-commits] core.git: sd/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 8 19:52:59 UTC 2021


 sd/source/ui/slideshow/slideshowimpl.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c33dd70aa7a6a5dc28b99f8af123548b02a77884
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Jan 8 17:37:20 2021 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jan 8 20:52:17 2021 +0100

    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.
    
    Change-Id: I7487cb9a79e7e5acc0b816eb4744a04559ae26ce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108986
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 0aa637d0dc43..5b4574261934 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
             {


More information about the Libreoffice-commits mailing list