pub struct IncrementalFrame { /* private fields */ }Expand description
A frame kept between calls: each new time redraws only what the last
frame and this one draw over the background. The image always equals
render_frame_with_art at the last time given.
Implementations§
Source§impl IncrementalFrame
impl IncrementalFrame
Sourcepub fn new(background: &IndexedImage) -> Self
pub fn new(background: &IndexedImage) -> Self
Starts as the bare background (nothing drawn yet).
pub fn image(&self) -> &IndexedImage
Sourcepub fn advance(
&mut self,
background: &IndexedImage,
graph: &SceneGraph,
atlas: &GlyphAtlas,
palette: &IndexedPalette,
t_ms: u64,
clock: Clock,
art: &dyn SceneArt,
) -> Vec<PixelRect>
pub fn advance( &mut self, background: &IndexedImage, graph: &SceneGraph, atlas: &GlyphAtlas, palette: &IndexedPalette, t_ms: u64, clock: Clock, art: &dyn SceneArt, ) -> Vec<PixelRect>
Moves to t_ms and returns the rectangles whose pixels may have
changed (sorted, without repeats): the only ones a copy of the last
frame needs, such as a GPU texture.
Trait Implementations§
Source§impl Clone for IncrementalFrame
impl Clone for IncrementalFrame
Auto Trait Implementations§
impl Forget for IncrementalFrame
impl Freeze for IncrementalFrame
impl Move for IncrementalFrame
impl RefUnwindSafe for IncrementalFrame
impl Send for IncrementalFrame
impl Sync for IncrementalFrame
impl Unpin for IncrementalFrame
impl UnsafeUnpin for IncrementalFrame
impl UnwindSafe for IncrementalFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more