Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138038

Irregular advancement of animations in LottieAnimation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.10
    • Lottie
    • None

      If LottieAnimation is not running at full frame rate, it will appear to advance in slow motion.

      This appears to be due to using QTimer to advance the frames. The QTimer interval is set to 1 / frameRate. In general, this is not going to be stable, since QTimer is not guaranteed to trigger at exact time periods. In addition, it does not account for the possibility that the frames take longer than the interval (either because they are slow to render or because the main thread is otherwise busy). The animation driver never advances more than one frame, so if rendering is slow it will be very visible.

      A solution here could be to keep an QElapsedTimer running and checking this in paint(), advancing the number of frames that have passed since the last paint event.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes