pub struct Tile {Show 20 fields
    pub tile_offset: TileOffset,
    pub world_tile_rect: WorldRect,
    pub local_tile_rect: PictureRect,
    pub local_dirty_rect: PictureRect,
    pub device_dirty_rect: DeviceRect,
    pub world_valid_rect: WorldRect,
    pub device_valid_rect: DeviceRect,
    pub current_descriptor: TileDescriptor,
    pub prev_descriptor: TileDescriptor,
    pub surface: Option<TileSurface>,
    pub is_valid: bool,
    pub is_visible: bool,
    pub id: TileId,
    pub is_opaque: bool,
    root: TileNode,
    background_color: Option<ColorF>,
    invalidation_reason: Option<InvalidationReason>,
    pub local_valid_rect: PictureBox2D,
    pub z_id: ZBufferId,
    pub sub_graphs: Vec<(PictureRect, Vec<(PictureCompositeMode, SurfaceIndex)>)>,
}Expand description
Information about a cached tile.
Fields§
§tile_offset: TileOffsetThe grid position of this tile within the picture cache
world_tile_rect: WorldRectThe current world rect of this tile.
local_tile_rect: PictureRectThe current local rect of this tile.
local_dirty_rect: PictureRectThe picture space dirty rect for this tile.
device_dirty_rect: DeviceRectThe device space dirty rect for this tile. TODO(gw): We have multiple dirty rects available due to the quadtree above. In future, expose these as multiple dirty rects, which will help in some cases.
world_valid_rect: WorldRectWorld space rect that contains valid pixels region of this tile.
device_valid_rect: DeviceRectDevice space rect that contains valid pixels region of this tile.
current_descriptor: TileDescriptorUniquely describes the content of this tile, in a way that can be (reasonably) efficiently hashed and compared.
prev_descriptor: TileDescriptorThe content descriptor for this tile from the previous frame.
surface: Option<TileSurface>Handle to the backing surface for this tile.
is_valid: boolIf true, this tile is marked valid, and the existing texture cache handle can be used. Tiles are invalidated during the build_dirty_regions method.
is_visible: boolIf true, this tile intersects with the currently visible screen rect, and will be drawn.
id: TileIdThe tile id is stable between display lists and / or frames, if the tile is retained. Useful for debugging tile evictions.
is_opaque: boolIf true, the tile was determined to be opaque, which means blending can be disabled when drawing it.
root: TileNodeRoot node of the quadtree dirty rect tracker.
background_color: Option<ColorF>The last rendered background color on this tile.
invalidation_reason: Option<InvalidationReason>The first reason the tile was invalidated this frame.
local_valid_rect: PictureBox2DThe local space valid rect for all primitives that affect this tile.
z_id: ZBufferIdz-buffer id for this tile
sub_graphs: Vec<(PictureRect, Vec<(PictureCompositeMode, SurfaceIndex)>)>Implementations§
Source§impl Tile
 
impl Tile
Sourcefn new(tile_offset: TileOffset) -> Self
 
fn new(tile_offset: TileOffset) -> Self
Construct a new, invalid tile.
Sourcefn print(&self, pt: &mut dyn PrintTreePrinter)
 
fn print(&self, pt: &mut dyn PrintTreePrinter)
Print debug information about this tile to a tree printer.
Sourcefn update_dirty_rects(
    &mut self,
    ctx: &TileUpdateDirtyContext<'_>,
    state: &mut TileUpdateDirtyState<'_>,
    invalidation_reason: &mut Option<InvalidationReason>,
    frame_context: &FrameVisibilityContext<'_>,
) -> PictureRect
 
fn update_dirty_rects( &mut self, ctx: &TileUpdateDirtyContext<'_>, state: &mut TileUpdateDirtyState<'_>, invalidation_reason: &mut Option<InvalidationReason>, frame_context: &FrameVisibilityContext<'_>, ) -> PictureRect
Check if the content of the previous and current tile descriptors match
Sourcefn update_content_validity(
    &mut self,
    ctx: &TileUpdateDirtyContext<'_>,
    state: &mut TileUpdateDirtyState<'_>,
    frame_context: &FrameVisibilityContext<'_>,
)
 
fn update_content_validity( &mut self, ctx: &TileUpdateDirtyContext<'_>, state: &mut TileUpdateDirtyState<'_>, frame_context: &FrameVisibilityContext<'_>, )
Invalidate a tile based on change in content. This must be called even if the tile is not currently visible on screen. We might be able to improve this later by changing how ComparableVec is used.
Sourcefn invalidate(
    &mut self,
    invalidation_rect: Option<PictureRect>,
    reason: InvalidationReason,
)
 
fn invalidate( &mut self, invalidation_rect: Option<PictureRect>, reason: InvalidationReason, )
Invalidate this tile. If invalidation_rect is None, the entire
tile is invalidated.
Sourcefn pre_update(&mut self, ctx: &TilePreUpdateContext)
 
fn pre_update(&mut self, ctx: &TilePreUpdateContext)
Called during pre_update of a tile cache instance. Allows the tile to setup state before primitive dependency calculations.
Sourcefn add_prim_dependency(&mut self, info: &PrimitiveDependencyInfo)
 
fn add_prim_dependency(&mut self, info: &PrimitiveDependencyInfo)
Add dependencies for a given primitive to this tile.
Sourcefn update_dirty_and_valid_rects(
    &mut self,
    ctx: &TileUpdateDirtyContext<'_>,
    state: &mut TileUpdateDirtyState<'_>,
    frame_context: &FrameVisibilityContext<'_>,
)
 
fn update_dirty_and_valid_rects( &mut self, ctx: &TileUpdateDirtyContext<'_>, state: &mut TileUpdateDirtyState<'_>, frame_context: &FrameVisibilityContext<'_>, )
Called during tile cache instance post_update. Allows invalidation and dirty rect calculation after primitive dependencies have been updated.
Sourcefn post_update(
    &mut self,
    ctx: &TilePostUpdateContext<'_>,
    state: &mut TilePostUpdateState<'_>,
    frame_context: &FrameVisibilityContext<'_>,
)
 
fn post_update( &mut self, ctx: &TilePostUpdateContext<'_>, state: &mut TilePostUpdateState<'_>, frame_context: &FrameVisibilityContext<'_>, )
Called during tile cache instance post_update. Allows invalidation and dirty rect calculation after primitive dependencies have been updated.
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnwindSafe for Tile
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
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>
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>
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