pub enum RenderNode {
Primitive(PrimitiveEntry),
DrawRun(DrawRunNode),
Layer(Box<LayerNode>),
}Expand description
A child of a layer in the render graph.
Variants§
Primitive(PrimitiveEntry)
A single draw or text primitive.
DrawRun(DrawRunNode)
A whole draw command’s primitives as one node. A heavy canvas records
thousands of primitives per frame; wrapping each in its own
RenderNode made the graph rebuild move every one of them twice and
free seventeen thousand nodes per frame on a stress scene. The run
keeps the recorded vector intact — semantically it is exactly that
many consecutive Primitive draw entries with no per-primitive clip.
Layer(Box<LayerNode>)
A nested layer.
Implementations§
Source§impl RenderNode
impl RenderNode
Sourcepub fn draw_phase(&self) -> Option<PrimitivePhase>
pub fn draw_phase(&self) -> Option<PrimitivePhase>
The phase the node paints in among its layer’s own draws: a
primitive’s or run’s, or a draw group layer’s. None for the layer
of a layout node, which is a child of the layer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RenderNode
impl !Send for RenderNode
impl !Sync for RenderNode
impl !UnwindSafe for RenderNode
impl Freeze for RenderNode
impl Unpin for RenderNode
impl UnsafeUnpin for RenderNode
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