pub enum Repaint {
Full,
Region(Vec<Rect>),
}Expand description
What a reused slot must repaint before its contents are a correct frame.
An enum rather than the reference’s { bool full; vector<Rect> region; },
because that struct can hold a full repaint and a region, and a caller
reading the region without checking the flag under-paints. Here the region
only exists when it is the answer.
Variants§
Full
Repaint the whole buffer: the slot has never been presented, or its damage history has scrolled away, or the union grew past the cap.
Region(Vec<Rect>)
Repaint exactly this union of damage since the slot was last presented.
In present order, oldest first, and not merged or deduplicated – the producer knows more about its own cost model than this does.
Trait Implementations§
impl Eq for Repaint
impl StructuralPartialEq for Repaint
Auto Trait Implementations§
impl Freeze for Repaint
impl RefUnwindSafe for Repaint
impl Send for Repaint
impl Sync for Repaint
impl Unpin for Repaint
impl UnsafeUnpin for Repaint
impl UnwindSafe for Repaint
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