Skip to main content

Recording

Struct Recording 

Source
pub struct Recording {
    pub passes: Vec<Pass>,
    pub extent: Extent2D,
    pub ramps: Vec<Ramp>,
}
Expand description

A finished recording, ready to submit.

More than one pass where the recording used layers. A layer is drawn into a target of its own and then composited back, which cannot happen in the same pass that samples it: reading an attachment being written needs machinery this does not have, and the separation is what makes group opacity mean “make this subtree, then fade it” rather than “fade each shape in it”.

Fields§

§passes: Vec<Pass>

Layers first, each before whatever samples it; the root target last.

The order falls out of how they are recorded rather than being sorted: a layer is finished when it is restored, which is necessarily before the draw that composites it.

§extent: Extent2D

The size of the caller’s surface, which is what the root pass renders at. A layer pass may be smaller; see Pass::extent.

§ramps: Vec<Ramp>

Gradients whose colors were too many to carry in a material, tabulated.

Recorded here rather than per pass because a slot table is per pass and this is not: the same gradient drawn into a layer and again over it is one ramp named twice.

Implementations§

Source§

impl Recording

Source

pub fn draw_count(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn root(&self) -> &Pass

The pass drawn into the caller’s surface.

Source

pub fn layer_count(&self) -> usize

How many offscreen targets executing this needs.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>