Struct webrender::command_buffer::CommandBuffer
source · pub struct CommandBuffer {
commands: Vec<Command>,
current_spatial_node_index: SpatialNodeIndex,
}
Expand description
A list of commands describing how to draw a primitive list.
Fields§
§commands: Vec<Command>
The encoded drawing commands.
current_spatial_node_index: SpatialNodeIndex
Cached current spatial node.
Implementations§
source§impl CommandBuffer
impl CommandBuffer
sourcepub fn set_segments(&mut self, segments: &[QuadSegment])
pub fn set_segments(&mut self, segments: &[QuadSegment])
Push a list of segments in to the cmd buffer
sourcepub fn add_prim(
&mut self,
prim_cmd: &PrimitiveCommand,
spatial_node_index: SpatialNodeIndex,
)
pub fn add_prim( &mut self, prim_cmd: &PrimitiveCommand, spatial_node_index: SpatialNodeIndex, )
Add a primitive to the command buffer.
sourcepub fn add_cmd(&mut self, prim_cmd: &PrimitiveCommand)
pub fn add_cmd(&mut self, prim_cmd: &PrimitiveCommand)
Add a cmd to the command buffer.
sourcepub fn iter_prims<F>(&self, f: &mut F)
pub fn iter_prims<F>(&self, f: &mut F)
Iterate the command list, calling a provided closure for each primitive draw command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandBuffer
impl RefUnwindSafe for CommandBuffer
impl Send for CommandBuffer
impl Sync for CommandBuffer
impl Unpin for CommandBuffer
impl UnwindSafe for CommandBuffer
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
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 more