pub struct RenderList { /* private fields */ }Implementations§
Source§impl RenderList
impl RenderList
pub fn new() -> Self
pub fn clear(&mut self)
pub fn push_opacity(&mut self, opacity: f32)
pub fn pop_opacity(&mut self)
pub fn opacity_depth(&self) -> usize
pub fn truncate_opacity(&mut self, depth: usize)
pub fn active_opacity(&self) -> f32
pub fn opacity_spans(&self) -> &[OpacitySpan]
pub fn has_opacity_groups(&self) -> bool
Sourcepub fn opacity_at(&self, index: usize) -> f32
pub fn opacity_at(&self, index: usize) -> f32
Returns the product of all group opacities covering index.
Includes groups that are still open, so it is usable while painting.
Sourcepub fn opacity_plan(&self) -> Vec<OpacityNode>
pub fn opacity_plan(&self) -> Vec<OpacityNode>
Builds a nested plan of item segments and opacity groups.
Spans are emitted when a group closes, so they arrive inner-first. Sorting by range and stack depth reconstructs the original nesting.
Sourcepub fn has_targets(&self) -> bool
pub fn has_targets(&self) -> bool
Returns true when the list contains any offscreen target pass.
Sourcepub fn target_plan(&self) -> Vec<PassNode>
pub fn target_plan(&self) -> Vec<PassNode>
Builds the execution plan for offscreen targets.
Target passes are emitted when they close, so a target that feeds another
target appears earlier in the plan than its consumer. Everything painted
outside a target - including RenderItem::Blit items, which stay in the
pass that contains them so painting order is preserved - becomes a
PassNode::Present segment. Segments and passes cover the whole list in
wiring order.
Nested targets are not supported: an inner target is still emitted as its own pass, but its items also stay inside the enclosing target’s range.
pub fn push_transform(&mut self, t: Transform)
pub fn pop_transform(&mut self)
pub fn transform_depth(&self) -> usize
pub fn truncate_transforms(&mut self, depth: usize)
pub fn active_transform(&self) -> Transform
pub fn item_transform(&self, index: usize) -> Transform
pub fn item_transforms(&self) -> &[Transform]
pub fn push_clip(&mut self, rect: Rect)
pub fn push_rounded_clip(&mut self, rect: Rect, radius: f32)
pub fn clip_depth(&self) -> usize
pub fn active_clip(&self) -> Option<Rect>
pub fn active_clip_for(&self, t_item: Transform) -> Option<Rect>
pub fn active_rounded_clip(&self) -> Option<RoundedClip>
pub fn item_rounded_clip(&self, index: usize) -> Option<RoundedClip>
pub fn truncate_clips(&mut self, depth: usize)
pub fn pop_clip(&mut self)
pub fn push_quad(&mut self, rect: Rect, color: Color, radius: f32)
pub fn push_bordered_quad( &mut self, rect: Rect, color: Color, radius: f32, border_width: f32, border_color: Color, )
pub fn push_shadow(&mut self, shadow: Shadow)
pub fn push_text(&mut self, draw: TextDraw)
pub fn push_image(&mut self, rect: Rect, uv: [f32; 4], source: ImageSource)
pub fn push_image_sampled( &mut self, rect: Rect, uv: [f32; 4], source: ImageSource, sampling: ImageSampling, )
pub fn push_waveform(&mut self, bars: &[Rect], color: Color)
pub fn items(&self) -> &[RenderItem]
Sourcepub fn push_shader(&mut self, draw: ShaderDraw)
pub fn push_shader(&mut self, draw: ShaderDraw)
Pushes a custom-shader rectangle.
The draw’s uniform payload is truncated to MAX_SHADER_UNIFORM_BYTES.
Duplicate texture bindings keep the last source for each index.
Sourcepub fn push_blit(
&mut self,
rect: Rect,
uv: [f32; 4],
target: RenderTargetId,
blend: BlendMode,
)
pub fn push_blit( &mut self, rect: Rect, uv: [f32; 4], target: RenderTargetId, blend: BlendMode, )
Pushes a copy of an offscreen target into the current target.
Sourcepub fn begin_target(&mut self, size: Size, blend: BlendMode) -> RenderTargetId
pub fn begin_target(&mut self, size: Size, blend: BlendMode) -> RenderTargetId
Starts an offscreen pass and returns its handle.
Rendering into targets is not implemented yet; the renderer records the
marker and warns during a frame. The handle can be referenced by
TexInput::Target in later stages.
Sourcepub fn end_target(&mut self, id: RenderTargetId)
pub fn end_target(&mut self, id: RenderTargetId)
Ends an offscreen pass started with RenderList::begin_target.
The marker is recorded but ignored by the stage 1 renderer.
Sourcepub fn shaders(&self) -> impl Iterator<Item = &ShaderDraw>
pub fn shaders(&self) -> impl Iterator<Item = &ShaderDraw>
Iterates over custom shader draws in recording order.
pub fn push_gradient( &mut self, rect: Rect, radius: f32, kind: GradientKind, stops: GradientStops, )
pub fn push_backdrop( &mut self, rect: Rect, radius: f32, blur: f32, dim: Color, noise: f32, mask: SpanMask, )
pub fn backdrops(&self) -> &[BackdropSpan]
pub fn has_backdrops(&self) -> bool
pub fn push_filter_begin( &mut self, rect: Rect, radius: f32, blur: f32, mask: SpanMask, ) -> Option<usize>
pub fn push_filter_end(&mut self, handle: usize)
pub fn filter_spans(&self) -> &[FilterSpan]
pub fn has_filters(&self) -> bool
pub fn item_clips(&self) -> &[Option<RoundedClip>]
pub fn quads(&self) -> impl Iterator<Item = &Quad>
pub fn images(&self) -> impl Iterator<Item = &ImageDraw>
pub fn shadows(&self) -> impl Iterator<Item = &Shadow>
pub fn waveforms(&self) -> impl Iterator<Item = &WaveformDraw>
pub fn gradients(&self) -> impl Iterator<Item = &GradientDraw>
pub fn gradient_count(&self) -> usize
pub fn waveform_bar_count(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn mark(&self) -> RenderMark
pub fn mark(&self) -> RenderMark
Records the current end of the list for RenderList::suffix.
Sourcepub fn suffix(&self, mark: RenderMark) -> Option<Self>
pub fn suffix(&self, mark: RenderMark) -> Option<Self>
Captures everything added since mark.
Backdrop, filter, and opacity spans are rebased to the start of the
suffix so RenderList::append can replay them. Returns None if the
clip/transform/opacity stacks are left open or the mark is out of
bounds.
Sourcepub fn append(&mut self, other: &Self)
pub fn append(&mut self, other: &Self)
Appends a cached suffix produced by RenderList::suffix.
Parent clip/transform/opacity state is not replayed: the captured items already contain their resolved clips and transforms. Backdrop, filter, and opacity spans are shifted by the current item count.