Struct webrender::picture::DirtyRegion
source · pub struct DirtyRegion {
pub combined: WorldRect,
spatial_node_index: SpatialNodeIndex,
}
Expand description
Represents the dirty region of a tile cache picture.
Fields§
§combined: WorldRect
The overall dirty rect, a combination of dirty_rects
spatial_node_index: SpatialNodeIndex
Spatial node of the picture cache this region represents
Implementations§
source§impl DirtyRegion
impl DirtyRegion
sourcepub fn new(spatial_node_index: SpatialNodeIndex) -> Self
pub fn new(spatial_node_index: SpatialNodeIndex) -> Self
Construct a new dirty region tracker.
sourcepub fn reset(&mut self, spatial_node_index: SpatialNodeIndex)
pub fn reset(&mut self, spatial_node_index: SpatialNodeIndex)
Reset the dirty regions back to empty
sourcepub fn add_dirty_region(
&mut self,
rect_in_pic_space: PictureRect,
spatial_tree: &SpatialTree
)
pub fn add_dirty_region( &mut self, rect_in_pic_space: PictureRect, spatial_tree: &SpatialTree )
Add a dirty region to the tracker. Returns the visibility mask that corresponds to this region in the tracker.
Trait Implementations§
source§impl Clone for DirtyRegion
impl Clone for DirtyRegion
source§fn clone(&self) -> DirtyRegion
fn clone(&self) -> DirtyRegion
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for DirtyRegion
impl Send for DirtyRegion
impl Sync for DirtyRegion
impl Unpin for DirtyRegion
impl UnwindSafe for DirtyRegion
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more