Skip to main content

reduce_for_caps

Function reduce_for_caps 

Source
pub fn reduce_for_caps(scene: &Expr, caps: &SurfaceCaps) -> Expr
Expand description

Deterministically fits a Scene to a surface’s display density.

Reads caps.display_density() and reduces child lists / table rows: glance keeps the first item, compact keeps the first three, and regular/dense/absent keep everything. The reduction is shallow and total – the same (scene, caps) always yields the same Scene.