pub struct DirtyGrid { /* private fields */ }Expand description
Fixed-allocation tile bitset covering a width x height surface.
Implementations§
Source§impl DirtyGrid
impl DirtyGrid
Sourcepub fn new_full(width: u32, height: u32) -> Self
pub fn new_full(width: u32, height: u32) -> Self
A grid with every tile initially marked dirty (for a fresh buffer’s first present).
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn mark_slice(&mut self, rects: &[PixelRect])
Sourcepub fn for_each_rect(&self, f: impl FnMut(PixelRect))
pub fn for_each_rect(&self, f: impl FnMut(PixelRect))
Calls f with non-overlapping rectangles covering every dirty tile,
merging horizontally adjacent tiles and consecutive identical tile rows.
Trait Implementations§
Auto Trait Implementations§
impl Forget for DirtyGrid
impl Freeze for DirtyGrid
impl Move for DirtyGrid
impl RefUnwindSafe for DirtyGrid
impl Send for DirtyGridwhere
RawVecInner: Send,
impl Sync for DirtyGridwhere
RawVecInner: Sync,
impl Unpin for DirtyGrid
impl UnsafeUnpin for DirtyGrid
impl UnwindSafe for DirtyGridwhere
RawVecInner: UnwindSafe,
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