pub struct Recording {
commands: Vec<RenderCommand>,
cached_strips: CachedStrips,
transform: Affine,
}
Expand description
A recording of rendering commands that can cache generated strips.
Fields§
§commands: Vec<RenderCommand>
Recorded commands.
cached_strips: CachedStrips
Cached sparse strips.
transform: Affine
Last recorded transform.
Implementations§
Source§impl Recording
impl Recording
Sourcepub fn set_transform(&mut self, transform: Affine)
pub fn set_transform(&mut self, transform: Affine)
Set the transform.
Sourcepub fn commands(&self) -> &[RenderCommand]
pub fn commands(&self) -> &[RenderCommand]
Get commands as a slice.
Sourcepub fn command_count(&self) -> usize
pub fn command_count(&self) -> usize
Get the number of commands.
Sourcepub fn has_cached_strips(&self) -> bool
pub fn has_cached_strips(&self) -> bool
Check if recording has cached strips.
Sourcepub fn strip_count(&self) -> usize
pub fn strip_count(&self) -> usize
Get the number of cached strips.
Sourcepub fn alpha_count(&self) -> usize
pub fn alpha_count(&self) -> usize
Get the number of cached alpha bytes.
Sourcepub fn get_cached_strips(&self) -> (&[Strip], &[u8])
pub fn get_cached_strips(&self) -> (&[Strip], &[u8])
Get cached strips.
Sourcepub fn take_cached_strips(&mut self) -> (Vec<Strip>, Vec<u8>, Vec<usize>)
pub fn take_cached_strips(&mut self) -> (Vec<Strip>, Vec<u8>, Vec<usize>)
Takes cached strip buffers.
Sourcepub fn get_strip_start_indices(&self) -> &[usize]
pub fn get_strip_start_indices(&self) -> &[usize]
Get strip start indices.
Sourcepub(crate) fn add_command(&mut self, command: RenderCommand)
pub(crate) fn add_command(&mut self, command: RenderCommand)
Add a command to the recording.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Recording
impl RefUnwindSafe for Recording
impl Send for Recording
impl Sync for Recording
impl Unpin for Recording
impl UnwindSafe for Recording
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