Struct webrender::picture::Tile

source ·
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: TileOffset

The grid position of this tile within the picture cache

§world_tile_rect: WorldRect

The current world rect of this tile.

§local_tile_rect: PictureRect

The current local rect of this tile.

§local_dirty_rect: PictureRect

The picture space dirty rect for this tile.

§device_dirty_rect: DeviceRect

The 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: WorldRect

World space rect that contains valid pixels region of this tile.

§device_valid_rect: DeviceRect

Device space rect that contains valid pixels region of this tile.

§current_descriptor: TileDescriptor

Uniquely describes the content of this tile, in a way that can be (reasonably) efficiently hashed and compared.

§prev_descriptor: TileDescriptor

The content descriptor for this tile from the previous frame.

§surface: Option<TileSurface>

Handle to the backing surface for this tile.

§is_valid: bool

If 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: bool

If true, this tile intersects with the currently visible screen rect, and will be drawn.

§id: TileId

The tile id is stable between display lists and / or frames, if the tile is retained. Useful for debugging tile evictions.

§is_opaque: bool

If true, the tile was determined to be opaque, which means blending can be disabled when drawing it.

§root: TileNode

Root 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: PictureBox2D

The local space valid rect for all primitives that affect this tile.

§z_id: ZBufferId

z-buffer id for this tile

§sub_graphs: Vec<(PictureRect, Vec<(PictureCompositeMode, SurfaceIndex)>)>

Implementations§

source§

impl Tile

source

fn new(tile_offset: TileOffset) -> Self

Construct a new, invalid tile.

source

fn print(&self, pt: &mut dyn PrintTreePrinter)

Print debug information about this tile to a tree printer.

source

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

source

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.

source

fn invalidate( &mut self, invalidation_rect: Option<PictureRect>, reason: InvalidationReason )

Invalidate this tile. If invalidation_rect is None, the entire tile is invalidated.

source

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.

source

fn add_prim_dependency(&mut self, info: &PrimitiveDependencyInfo)

Add dependencies for a given primitive to this tile.

source

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.

source

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 RefUnwindSafe for Tile

§

impl Send for Tile

§

impl Sync for Tile

§

impl Unpin for Tile

§

impl UnwindSafe for Tile

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.