pub struct TileNode {
pub kind: TileNodeKind,
pub rect: PictureBox2D,
}
Expand description
A node in the dirty rect tracking quadtree.
Fields§
§kind: TileNodeKind
Leaf or internal node
rect: PictureBox2D
Rect of this node in the same space as the tile cache picture
Implementations§
source§impl TileNode
impl TileNode
sourcefn new_leaf(curr_indices: Vec<PrimitiveDependencyIndex>) -> Self
fn new_leaf(curr_indices: Vec<PrimitiveDependencyIndex>) -> Self
Construct a new leaf node, with the given primitive dependency index buffer
sourcefn draw_debug_rects(
&self,
pic_to_world_mapper: &SpaceMapper<PicturePixel, WorldPixel>,
is_opaque: bool,
local_valid_rect: PictureRect,
scratch: &mut PrimitiveScratchBuffer,
global_device_pixel_scale: DevicePixelScale,
)
fn draw_debug_rects( &self, pic_to_world_mapper: &SpaceMapper<PicturePixel, WorldPixel>, is_opaque: bool, local_valid_rect: PictureRect, scratch: &mut PrimitiveScratchBuffer, global_device_pixel_scale: DevicePixelScale, )
Draw debug information about this tile node
sourcefn get_child_rects(rect: &PictureBox2D, result: &mut [PictureBox2D; 4])
fn get_child_rects(rect: &PictureBox2D, result: &mut [PictureBox2D; 4])
Calculate the four child rects for a given node
sourcefn clear(&mut self, rect: PictureBox2D)
fn clear(&mut self, rect: PictureBox2D)
Called during pre_update, to clear the current dependencies
sourcefn add_prim(
&mut self,
index: PrimitiveDependencyIndex,
prim_rect: &PictureBox2D,
)
fn add_prim( &mut self, index: PrimitiveDependencyIndex, prim_rect: &PictureBox2D, )
Add a primitive dependency to this node
sourcefn maybe_merge_or_split(
&mut self,
level: i32,
curr_prims: &[PrimitiveDescriptor],
max_split_levels: i32,
)
fn maybe_merge_or_split( &mut self, level: i32, curr_prims: &[PrimitiveDescriptor], max_split_levels: i32, )
Apply a merge or split operation to this tile, if desired
sourcefn update_dirty_rects(
&mut self,
prev_prims: &[PrimitiveDescriptor],
curr_prims: &[PrimitiveDescriptor],
prim_comparer: &mut PrimitiveComparer<'_>,
dirty_rect: &mut PictureBox2D,
compare_cache: &mut FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>,
invalidation_reason: &mut Option<InvalidationReason>,
frame_context: &FrameVisibilityContext<'_>,
)
fn update_dirty_rects( &mut self, prev_prims: &[PrimitiveDescriptor], curr_prims: &[PrimitiveDescriptor], prim_comparer: &mut PrimitiveComparer<'_>, dirty_rect: &mut PictureBox2D, compare_cache: &mut FastHashMap<PrimitiveComparisonKey, PrimitiveCompareResult>, invalidation_reason: &mut Option<InvalidationReason>, frame_context: &FrameVisibilityContext<'_>, )
Update the dirty state of this node, building the overall dirty rect
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileNode
impl RefUnwindSafe for TileNode
impl Send for TileNode
impl Sync for TileNode
impl Unpin for TileNode
impl UnwindSafe for TileNode
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