pub struct AnimatedKitty { /* private fields */ }Expand description
The animated kitty surface presenter: the first frame becomes the root frame of one image, placed once, and every later surface appends a frame composed onto the previous one plus the rectangles that changed. Playback runs in the terminal: loading mode plays the frames it holds at the gap pace and waits for more, so the wire is a buffer, jitter never reaches the screen, and motion happens at the compositor’s rate rather than the client’s. An unchanged frame writes nothing.
Frames accumulate terminal-side, so every 96 frames a fresh root frame (one whole compressed transmit) goes up under the alternate id, and then the finished reel stops and is freed.
Implementations§
Source§impl AnimatedKitty
impl AnimatedKitty
Sourcepub fn new(
base: u32,
frames_per_second: u32,
tile_side: u32,
budget: usize,
) -> Self
pub fn new( base: u32, frames_per_second: u32, tile_side: u32, budget: usize, ) -> Self
A presenter handing out image ids from base upward, playing at
frames_per_second, tiling changed rectangles at tile_side
surface pixels. Past budget damaged rectangles one whole frame
wins over hundreds of edits.
Sourcepub fn repaint(&mut self)
pub fn repaint(&mut self)
Start a fresh reel on the next frame, for when the terminal may have lost what it was showing.