Skip to main content

SceneRecording

Struct SceneRecording 

Source
pub struct SceneRecording { /* private fields */ }

Implementations§

Source§

impl SceneRecording

Source

pub fn replay_ops(&mut self, ops: &[SceneOp])

Source

pub fn replay_ops_translated(&mut self, ops: &[SceneOp], delta: Point)

Source

pub fn replay_ops_transformed( &mut self, ops: &[SceneOp], transform: Transform2D, )

Source§

impl SceneRecording

Source

pub fn push_shadow_rrect_quad_fallback(&mut self, spec: ShadowRRectFallbackSpec)

Replay the deterministic quad fallback for a rounded-rect shadow primitive into this scene.

Source§

impl SceneRecording

Source§

impl SceneRecording

Source

pub fn clear(&mut self)

Source

pub fn push(&mut self, op: SceneOp)

Source

pub fn with_transform<T>( &mut self, transform: Transform2D, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_opacity<T>( &mut self, opacity: f32, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_layer<T>(&mut self, layer: u32, f: impl FnOnce(&mut Self) -> T) -> T

Source

pub fn with_clip_rect<T>( &mut self, rect: Rect, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_clip_rrect<T>( &mut self, rect: Rect, corner_radii: Corners, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_clip_path<T>( &mut self, bounds: Rect, origin: Point, path: PathId, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_mask<T>( &mut self, bounds: Rect, mask: Mask, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_effect<T>( &mut self, bounds: Rect, mode: EffectMode, chain: EffectChain, quality: EffectQuality, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_composite_group<T>( &mut self, desc: CompositeGroupDesc, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn with_backdrop_source_group_v1<T>( &mut self, bounds: Rect, pyramid: Option<CustomEffectPyramidRequestV1>, quality: EffectQuality, f: impl FnOnce(&mut Self) -> T, ) -> T

Source

pub fn ops(&self) -> &[SceneOp]

Source

pub fn ops_len(&self) -> usize

Source

pub fn swap_storage( &mut self, other_ops: &mut Vec<SceneOp>, other_fingerprint: &mut u64, )

Swap the internal op storage with an external buffer.

This is a performance-oriented API used by subsystems like the UI paint cache to “take” the previous frame’s ops without copying.

In debug builds, this asserts if called more than once without an intervening clear(), because repeated swaps typically indicate multiple paint-cache ingestions from the same scene.

Source

pub fn fingerprint(&self) -> u64

Trait Implementations§

Source§

impl Clone for SceneRecording

Source§

fn clone(&self) -> SceneRecording

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SceneRecording

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SceneRecording

Source§

fn default() -> SceneRecording

Returns the “default value” for a type. Read more

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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