Skip to main content

culled

Function culled 

pub fn culled(
    scene: &Scene,
    parts: &SectionParts,
    wanted: impl Fn(&[Rect]) -> bool,
) -> Option<Scene>
Expand description

scene, drawn with parts, without every bounded part whose bounds wanted refuses, or None when no part is left out. Where the parts left out paint nothing, the result paints what scene does: a part’s commands depend on nothing before them ([boundary]), and only a part whose layers it pops itself is left out, so every layer around the rest is the same. A renderer’s work grows with every path a scene holds, wherever it lands, so a frame repainting a small damage renders only what can reach it.