lib_ui/ui/effects
Loïc Molinari ac04800962 Fix dangling timer event in animations manager
A race condition in the animations manager can leave a dangling
timerEvent() callback firing at a high frequency (>120 FPS) in the
main loop even though there is no active animations.

An update of the animations manager returns directly when there is no
active animations. If there is at least one active animation, it stops
the timer and schedules a new update before updating animations.
Depending on the Integration implementation, the scheduling call can
be postponed after the current update. The actual postponed call
unconditionally schedules an update by starting the timer. The issue
is that in the meantime the last remaining animation could have been
removed and, when the timer callback would be fired, the update would
return directly (since there is no active animations) without being
able to stop.

The explanation above ignores the updateQueued() cases of the
postponed call for simplicity. These cases do not result in infinite
updates like the timer case but still imply one useless (invoked)
update.

This fix adds a condition in the postponed call ensuring there is at
least one active animation before processing.

telegramdesktop/tdesktop#3640
telegramdesktop/tdesktop#4854
telegramdesktop/tdesktop#5436
2021-04-13 21:18:04 +03:00
..
animation_value.cpp Wrapped AnimationsDisabled with rpl::variable. 2020-12-03 21:14:22 +03:00
animation_value.h Move CallMuteButton to td_ui for now. 2021-03-11 19:17:54 +04:00
animations.cpp Fix dangling timer event in animations manager 2021-04-13 21:18:04 +03:00
animations.h Fix possible assertion violation in animations shutdown. 2019-12-31 13:48:16 +03:00
cross_animation.cpp Fix build with Qt 5.15 2020-06-01 18:32:44 +04:00
cross_animation.h Initial commit. 2019-09-17 17:48:58 +03:00
cross_line.cpp Fixed invalidation of CrossLineAnimation. 2021-02-01 10:58:42 +03:00
cross_line.h Fixed invalidation of CrossLineAnimation. 2021-02-01 10:58:42 +03:00
fade_animation.cpp Initial commit. 2019-09-17 17:48:58 +03:00
fade_animation.h Initial commit. 2019-09-17 17:48:58 +03:00
gradient.h Added ability to pass different count of colors to gradients. 2020-12-17 15:57:46 +03:00
numbers_animation.cpp Fix deprecation warnings on Qt 5.15.1. 2020-11-04 18:44:45 +03:00
numbers_animation.h Initial commit. 2019-09-17 17:48:58 +03:00
panel_animation.cpp Initial commit. 2019-09-17 17:48:58 +03:00
panel_animation.h Initial commit. 2019-09-17 17:48:58 +03:00
radial_animation.cpp Fix radial updates with disabled animations. 2020-01-22 11:10:53 +03:00
radial_animation.h Draw radial animation in a static method. 2019-12-10 15:12:48 +03:00
ripple_animation.cpp Initial commit. 2019-09-17 17:48:58 +03:00
ripple_animation.h Initial commit. 2019-09-17 17:48:58 +03:00
slide_animation.cpp Allow querying slide animation state. 2019-09-26 09:53:57 +03:00
slide_animation.h Allow querying slide animation state. 2019-09-26 09:53:57 +03:00