pub struct Scene {
pub shadows: Vec<Shadow>,
pub quads: Vec<Quad>,
pub paths: Vec<Path<ScaledPixels>>,
pub underlines: Vec<Underline>,
pub monochrome_sprites: Vec<MonochromeSprite>,
pub subpixel_sprites: Vec<SubpixelSprite>,
pub polychrome_sprites: Vec<PolychromeSprite>,
pub surfaces: Vec<PaintSurface>,
pub custom_draws: Vec<CustomDraw>,
pub shader_draws: Vec<ShaderDraw>,
pub backdrops: Vec<BackdropDraw>,
pub layer_boundaries: Vec<LayerBoundary>,
/* private fields */
}Fields§
§shadows: Vec<Shadow>§quads: Vec<Quad>§paths: Vec<Path<ScaledPixels>>§underlines: Vec<Underline>§monochrome_sprites: Vec<MonochromeSprite>§subpixel_sprites: Vec<SubpixelSprite>§polychrome_sprites: Vec<PolychromeSprite>§surfaces: Vec<PaintSurface>§custom_draws: Vec<CustomDraw>§shader_draws: Vec<ShaderDraw>Ordered, directly rendered fragment shader instances.
backdrops: Vec<BackdropDraw>Explicit backdrop sampling boundaries.
layer_boundaries: Vec<LayerBoundary>Ordered begin/end markers for captured subtrees.
Implementations§
Source§impl Scene
impl Scene
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn push_layer(&mut self, bounds: Bounds<ScaledPixels>)
pub fn pop_layer(&mut self)
pub fn insert_primitive(&mut self, primitive: impl Into<Primitive>)
pub fn replay(&mut self, range: Range<usize>, prev_scene: &Scene)
Sourcepub fn begin_layer_capture(
&mut self,
capture: Arc<LayerCapture>,
viewport: ContentMask<ScaledPixels>,
)
pub fn begin_layer_capture( &mut self, capture: Arc<LayerCapture>, viewport: ContentMask<ScaledPixels>, )
Begin an explicit captured subtree. End with the returned description.
Sourcepub fn end_layer_capture(
&mut self,
capture: Arc<LayerCapture>,
viewport: ContentMask<ScaledPixels>,
)
pub fn end_layer_capture( &mut self, capture: Arc<LayerCapture>, viewport: ContentMask<ScaledPixels>, )
End the matching captured subtree.
Sourcepub fn layer_plans(
&self,
viewport: Size<DevicePixels>,
) -> Result<Vec<LayerPlan>>
pub fn layer_plans( &self, viewport: Size<DevicePixels>, ) -> Result<Vec<LayerPlan>>
Validate nesting, bounds and command revisions before any group GPU work.
Sourcepub fn backdrop_cache_keys(
&self,
viewport: Size<DevicePixels>,
) -> Result<Vec<BackdropCacheKey>>
pub fn backdrop_cache_keys( &self, viewport: Size<DevicePixels>, ) -> Result<Vec<BackdropCacheKey>>
Conservative whole-prefix dependencies for backdrop capture reuse. Retained replay preserves identities; newly painted commands invalidate.
pub fn finish(&mut self)
pub fn batches(&self) -> impl Iterator<Item = PrimitiveBatch> + '_
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scene
impl !Send for Scene
impl !Sync for Scene
impl !UnwindSafe for Scene
impl Freeze for Scene
impl Unpin for Scene
impl UnsafeUnpin for Scene
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().