pub struct DisplayList { /* private fields */ }Expand description
Reusable backend-agnostic command buffer emitted once per frame for Software, Hardware, or Hybrid execution.
Implementations§
Source§impl DisplayList
Command emission helpers for DisplayList.
impl DisplayList
Command emission helpers for DisplayList.
Sourcepub fn reset(&mut self, viewport: Size, scale_factor: f32)
pub fn reset(&mut self, viewport: Size, scale_factor: f32)
Clears all commands while recycling backing String buffers into the per-frame string pool.
§Arguments
&Self- Mutable display list.Size- Target logical viewport size.f32- Active DPI scale factor.
Sourcepub fn set_gpu_scene_pass(&mut self, pass: Option<DirectGpuScenePass>)
pub fn set_gpu_scene_pass(&mut self, pass: Option<DirectGpuScenePass>)
Attaches an optional hardware GPU offscreen scene pass (OceanFluid or World3d) to this frame’s display list.
§Arguments
Option<DirectGpuScenePass>- Offscreen GPU scene pass executed before UI compositing.
Sourcepub fn gpu_scene_pass_clone(&self) -> Option<DirectGpuScenePass>
pub fn gpu_scene_pass_clone(&self) -> Option<DirectGpuScenePass>
Returns a cloned copy of this frame’s optional hardware GPU offscreen scene pass.
§Returns
Option<DirectGpuScenePass>- Cloned GPU scene pass when present.
Sourcepub fn push(&mut self, command: DrawCommand)
pub fn push(&mut self, command: DrawCommand)
Appends a single DrawCommand to the list and updates O(1) streaming digests incrementally.
§Arguments
&Self- Mutable display list.DrawCommand- Command to push.
Sourcepub fn extend_commands(&mut self, commands_slice: &[DrawCommand])
pub fn extend_commands(&mut self, commands_slice: &[DrawCommand])
Appends a slice of DrawCommand items while updating streaming fast/base digests incrementally.
§Arguments
&Self- Mutable display list.&[DrawCommand]- Slice of commands to clone and append.
Sourcepub fn fast_digest(&self) -> u64
pub fn fast_digest(&self) -> u64
Sourcepub fn base_layer_version(&self) -> u64
pub fn base_layer_version(&self) -> u64
Sourcepub fn base_layer_hash(&self) -> u64
pub fn base_layer_hash(&self) -> u64
Source§impl DisplayList
Implements impl #impl_generics #name #ty_generics #where_clause.
impl DisplayList
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_commands(&self) -> &Vec<DrawCommand>
pub fn get_mut_commands(&mut self) -> &mut Vec<DrawCommand>
pub fn set_commands(&mut self, val: Vec<DrawCommand>) -> &mut Self
pub fn get_viewport(&self) -> Size
pub fn get_mut_viewport(&mut self) -> &mut Size
pub fn set_viewport(&mut self, val: Size) -> &mut Self
pub fn get_scale_factor(&self) -> f32
pub fn get_mut_scale_factor(&mut self) -> &mut f32
pub fn set_scale_factor(&mut self, val: f32) -> &mut Self
pub fn get_portal_split_index(&self) -> usize
pub fn get_mut_portal_split_index(&mut self) -> &mut usize
pub fn set_portal_split_index(&mut self, val: usize) -> &mut Self
pub fn get_direct_gpu_scene_enabled(&self) -> bool
pub fn get_mut_direct_gpu_scene_enabled(&mut self) -> &mut bool
pub fn set_direct_gpu_scene_enabled(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for DisplayList
impl Clone for DisplayList
Source§impl Debug for DisplayList
impl Debug for DisplayList
Source§impl Default for DisplayList
impl Default for DisplayList
Source§impl PartialEq for DisplayList
impl PartialEq for DisplayList
impl StructuralPartialEq for DisplayList
Auto Trait Implementations§
impl Forget for DisplayList
impl Freeze for DisplayListwhere
*const u8 is !null: Freeze,
PhantomData<DrawCommand>: Freeze,
*const GpuOceanScenePass is !null: Freeze,
PhantomData<GpuOceanScenePass>: Freeze,
*const GpuWorld3dScenePass is !null: Freeze,
PhantomData<GpuWorld3dScenePass>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(i32, usize, NodeId)>: Freeze,
PhantomData<NodeId>: Freeze,
impl Move for DisplayList
impl RefUnwindSafe for DisplayList
impl Send for DisplayList
impl Sync for DisplayList
impl Unpin for DisplayList
impl UnsafeUnpin for DisplayListwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<DrawCommand>: UnsafeUnpin,
*const GpuOceanScenePass is !null: UnsafeUnpin,
PhantomData<GpuOceanScenePass>: UnsafeUnpin,
*const GpuWorld3dScenePass is !null: UnsafeUnpin,
PhantomData<GpuWorld3dScenePass>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(i32, usize, NodeId)>: UnsafeUnpin,
PhantomData<NodeId>: UnsafeUnpin,
impl UnwindSafe for DisplayListwhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
Arc<Vec<u8>>: UnwindSafe,
BoxRaw<GpuOceanScenePass>: UnwindSafe,
BoxRaw<GpuWorld3dScenePass>: UnwindSafe,
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