pub struct LayerFrame {
pub key: LayerKey,
pub generation: u64,
pub background: Rgba,
pub tile_size: u32,
pub content: LayerContent,
pub dirty_tiles: Vec<TileCoord>,
}Expand description
A layer the frame composites: the content its tiles are rasterized from.
Fields§
§key: LayerKeyThe layer, stable while it lives.
generation: u64Bumps whenever content is replaced.
background: RgbaThe opaque colour every tile is cleared with before its content is drawn.
tile_size: u32The side of a tile, in device pixels.
content: LayerContentThe painted content in content space.
dirty_tiles: Vec<TileCoord>The tiles whose content changed in this generation.
Implementations§
Source§impl LayerFrame
impl LayerFrame
Sourcepub fn tile_bounds(&self, tile: TileCoord) -> Bounds<ScaledPixels>
pub fn tile_bounds(&self, tile: TileCoord) -> Bounds<ScaledPixels>
The rectangle tile covers in content space.
Sourcepub fn tile_scene(&self, tile: TileCoord) -> Scene
pub fn tile_scene(&self, tile: TileCoord) -> Scene
The primitives of content that are visible over tile, translated
into the tile’s space (its top-left corner at the origin), in drawing
order, finished and ready to batch.
Trait Implementations§
Auto Trait Implementations§
impl !Send for LayerFrame
impl !Sync for LayerFrame
impl Forget for LayerFrame
impl Freeze for LayerFrame
impl RefUnwindSafe for LayerFrame
impl Unpin for LayerFrame
impl UnsafeUnpin for LayerFrame
impl UnwindSafe for LayerFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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