pub struct BlitPlanner<const N: usize> { /* private fields */ }Expand description
Collects dirty rectangles for a frame and optionally coalesces them.
The planner stores up to N rectangles in a stack-allocated buffer. Call
Self::add to register a region that changed during rendering and
Self::rects to obtain the batched list for flushing. After presenting
the frame, call Self::clear to reuse the planner for the next frame.
Adds beyond N are silently dropped, but Self::overflowed flips to
true so callers driving a dirty-rect present path know the rect set is
incomplete and can fall back to a full-frame repaint for that frame.
Implementations§
Source§impl<const N: usize> BlitPlanner<N>
impl<const N: usize> BlitPlanner<N>
Sourcepub fn overflowed(&self) -> bool
pub fn overflowed(&self) -> bool
Whether Self::add dropped a rect because the planner was full.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for BlitPlanner<N>
impl<const N: usize> RefUnwindSafe for BlitPlanner<N>
impl<const N: usize> Send for BlitPlanner<N>
impl<const N: usize> Sync for BlitPlanner<N>
impl<const N: usize> Unpin for BlitPlanner<N>
impl<const N: usize> UnsafeUnpin for BlitPlanner<N>
impl<const N: usize> UnwindSafe for BlitPlanner<N>
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