mirror of
https://github.com/wez/wezterm.git
synced 2024-09-21 03:39:16 +03:00
minor optimization for single-frame animated formats
Use 1-day duration for the single frame when an animated format yields only a single frame.
This commit is contained in:
parent
829e5c15cf
commit
001a49be4c
@ -384,6 +384,12 @@ impl FrameState {
|
||||
self.current_frame.duration = Duration::from_secs(86400);
|
||||
self.frames.push(self.current_frame.clone());
|
||||
false
|
||||
} else if self.frames.len() == 1 {
|
||||
// If there's only a single frame, we may as well ensure
|
||||
// that it has a long duration so that we don't waste
|
||||
// resources ticking to the same frame over and over
|
||||
self.frames[0].duration = Duration::from_secs(86400);
|
||||
true
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user