pub struct Compositor;Expand description
Compiles a LayoutNode tree into a DisplayList following CSS 2.1 Appendix E.
Implementations§
Source§impl Compositor
impl Compositor
Sourcepub const MAX_COMPOSITOR_DEPTH: usize = 1024
pub const MAX_COMPOSITOR_DEPTH: usize = 1024
Maximum allowable recursion depth for stacking context and layout node display list composition.
Sourcepub fn build_display_list(root: &LayoutNode) -> DisplayList
pub fn build_display_list(root: &LayoutNode) -> DisplayList
Compiles a layout tree root into an ordered DisplayList.
Sourcepub fn build_display_list_with_viewport(
root: &LayoutNode,
viewport: Option<Rect>,
) -> DisplayList
pub fn build_display_list_with_viewport( root: &LayoutNode, viewport: Option<Rect>, ) -> DisplayList
Compiles a layout tree root into an ordered DisplayList with spatial viewport culling. Elements outside the active viewport buffer zone are culled from command emission.
Sourcepub fn build_display_list_with_scrollbars(
root: &LayoutNode,
viewport: Option<Rect>,
scrollbars: &[ScrollbarOverlay],
) -> DisplayList
pub fn build_display_list_with_scrollbars( root: &LayoutNode, viewport: Option<Rect>, scrollbars: &[ScrollbarOverlay], ) -> DisplayList
Compiles a layout tree root (including Top-Layer portals) into a DisplayList while emitting each scroll container’s scrollbar thumb inline inside its own stacking context and clip bounds.
Sourcepub fn build_document_display_list_with_viewport(
root: &LayoutNode,
viewport: Option<Rect>,
) -> DisplayList
pub fn build_document_display_list_with_viewport( root: &LayoutNode, viewport: Option<Rect>, ) -> DisplayList
Compiles only the document stacking contexts (excluding Top-Layer <Portal> overlays)
so document scrollbars can be emitted before Top-Layer overlays are composited.
Sourcepub fn build_document_display_list_with_scrollbars(
root: &LayoutNode,
viewport: Option<Rect>,
scrollbars: &[ScrollbarOverlay],
) -> DisplayList
pub fn build_document_display_list_with_scrollbars( root: &LayoutNode, viewport: Option<Rect>, scrollbars: &[ScrollbarOverlay], ) -> DisplayList
Compiles only the document stacking contexts (excluding Top-Layer <Portal> overlays),
emitting each document scroll container’s scrollbar thumb inline inside its stacking context.
Sourcepub fn append_top_layer_portals(
root: &LayoutNode,
list: &mut DisplayList,
viewport: Option<Rect>,
)
pub fn append_top_layer_portals( root: &LayoutNode, list: &mut DisplayList, viewport: Option<Rect>, )
Appends all Top-Layer <Portal> overlays to an existing DisplayList.
Sourcepub fn append_top_layer_portals_with_scrollbars(
root: &LayoutNode,
list: &mut DisplayList,
viewport: Option<Rect>,
scrollbars: &[ScrollbarOverlay],
)
pub fn append_top_layer_portals_with_scrollbars( root: &LayoutNode, list: &mut DisplayList, viewport: Option<Rect>, scrollbars: &[ScrollbarOverlay], )
Appends all Top-Layer <Portal> overlays to an existing DisplayList while emitting
portal scroll container thumbs inline inside each portal’s stacking context.
Sourcepub fn establishes_stacking_context(node: &LayoutNode, is_root: bool) -> bool
pub fn establishes_stacking_context(node: &LayoutNode, is_root: bool) -> bool
Determines if an element establishes a new Stacking Context (without parent display context).
For flex/grid item z-index awareness, tree traversals use
LayoutNode::establishes_stacking_context_in.
Sourcepub fn paint_stacking_context(node: &LayoutNode, list: &mut DisplayList)
pub fn paint_stacking_context(node: &LayoutNode, list: &mut DisplayList)
Paints a stacking context according to the 7-layer CSS 2.1 Appendix E algorithm.
Sourcepub fn paint_stacking_context_culled(
node: &LayoutNode,
list: &mut DisplayList,
cull: Option<Rect>,
)
pub fn paint_stacking_context_culled( node: &LayoutNode, list: &mut DisplayList, cull: Option<Rect>, )
Paints a stacking context with optional spatial viewport culling.
Sourcepub fn paint_stacking_context_guarded(
node: &LayoutNode,
list: &mut DisplayList,
cull: Option<Rect>,
depth: usize,
)
pub fn paint_stacking_context_guarded( node: &LayoutNode, list: &mut DisplayList, cull: Option<Rect>, depth: usize, )
Paints a stacking context with optional spatial viewport culling and active recursion depth guard.
Sourcepub fn paint_node_content(node: &LayoutNode, list: &mut DisplayList)
pub fn paint_node_content(node: &LayoutNode, list: &mut DisplayList)
Paints an in-flow non-stacking-context node and its recursive children.
Sourcepub fn paint_node_content_culled(
node: &LayoutNode,
list: &mut DisplayList,
cull: Option<Rect>,
)
pub fn paint_node_content_culled( node: &LayoutNode, list: &mut DisplayList, cull: Option<Rect>, )
Paints an in-flow non-stacking-context node with optional spatial viewport culling.
Sourcepub fn paint_node_content_guarded(
node: &LayoutNode,
list: &mut DisplayList,
cull: Option<Rect>,
depth: usize,
)
pub fn paint_node_content_guarded( node: &LayoutNode, list: &mut DisplayList, cull: Option<Rect>, depth: usize, )
Paints an in-flow non-stacking-context node with optional spatial viewport culling and active recursion depth guard.