-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.10
-
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.