perf: skip update from GIF timer if no animated elements are shown (#5042)

This commit is contained in:
nerix
2023-12-25 20:04:46 +01:00
committed by GitHub
parent 485fc5cdb4
commit 1006bf955a
9 changed files with 51 additions and 20 deletions
+3
View File
@@ -273,6 +273,9 @@ private:
bool lastMessageHasAlternateBackground_ = false;
bool lastMessageHasAlternateBackgroundReverse_ = true;
/// Tracks if this view has painted any animated element in the last #paintEvent().
bool anyAnimationShown_ = false;
bool pausable_ = false;
QTimer pauseTimer_;
std::unordered_map<PauseReason, std::optional<SteadyClock::time_point>>