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: CachedStripsCached sparse strips.
transform: AffineTrack the transform of the underlying rasterization context.
Implementations§
Source§impl Recording
impl Recording
Sourcepub(crate) fn set_transform(&mut self, transform: Affine)
pub(crate) 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) -> (StripStorage, Vec<usize>)
pub fn take_cached_strips(&mut self) -> (StripStorage, 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.
Sourcepub fn set_cached_strips(
&mut self,
strip_storage: StripStorage,
strip_start_indices: Vec<usize>,
)
pub fn set_cached_strips( &mut self, strip_storage: StripStorage, strip_start_indices: Vec<usize>, )
Set cached strips.
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