Struct webrender::quad::QuadTileClassifier
source · pub struct QuadTileClassifier {
buffer: [QuadTileInfo; 16],
mask_regions: Vec<LayoutRect>,
clip_in_regions: Vec<LayoutRect>,
clip_out_regions: Vec<LayoutRect>,
rect: LayoutRect,
x_tiles: usize,
y_tiles: usize,
}
Expand description
A helper struct for classifying a set of tiles within a quad depending on what strategy they can be used to draw them.
Fields§
§buffer: [QuadTileInfo; 16]
§mask_regions: Vec<LayoutRect>
§clip_in_regions: Vec<LayoutRect>
§clip_out_regions: Vec<LayoutRect>
§rect: LayoutRect
§x_tiles: usize
§y_tiles: usize
Implementations§
source§impl QuadTileClassifier
impl QuadTileClassifier
pub fn new() -> Self
pub fn reset(&mut self, x_tiles: usize, y_tiles: usize, rect: LayoutRect)
sourcepub fn add_mask_region(&mut self, mask_region: LayoutRect)
pub fn add_mask_region(&mut self, mask_region: LayoutRect)
Add an area that needs a clip mask / indirect area
pub fn add_clip_rect(&mut self, clip_rect: LayoutRect, clip_mode: ClipMode)
sourcepub fn classify(&mut self) -> &[QuadTileInfo]
pub fn classify(&mut self) -> &[QuadTileInfo]
Classify all the tiles in to categories, based on the provided masks and clip regions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuadTileClassifier
impl RefUnwindSafe for QuadTileClassifier
impl Send for QuadTileClassifier
impl Sync for QuadTileClassifier
impl Unpin for QuadTileClassifier
impl UnwindSafe for QuadTileClassifier
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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