pub struct EngineDraw {
pub paint: Paint,
pub depth: u32,
pub strip_range: Range<usize>,
}Expand description
One recorded draw: a paint, a depth, and the strips it covers.
paint is a vello_common Paint — either an inline solid colour or an
index into the frame’s encoded-paint table. Carrying the vello type here
(rather than a peniko::Brush) is what keeps the GPU-side conversion a
plain field read, and is the seam the paint-encoding pass writes into.
Fields§
§paint: PaintPaint applied to every strip in strip_range.
depth: u32Painter’s-algorithm depth, assigned by DepthCounter.
The back-most draw of a frame is 0 and each subsequent draw is one
greater, matching the GPU strip instance’s depth_index contract: a
larger value is nearer the viewer and wins the depth test.
strip_range: Range<usize>Half-open range selecting this draw’s strips from the frame’s shared strip storage.
Implementations§
Trait Implementations§
Source§impl Clone for EngineDraw
impl Clone for EngineDraw
Source§impl Debug for EngineDraw
impl Debug for EngineDraw
Auto Trait Implementations§
impl Freeze for EngineDraw
impl RefUnwindSafe for EngineDraw
impl Send for EngineDraw
impl Sync for EngineDraw
impl Unpin for EngineDraw
impl UnsafeUnpin for EngineDraw
impl UnwindSafe for EngineDraw
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