Skip to main content

Compositor

Struct Compositor 

Source
pub struct Compositor;
Expand description

Compiles a LayoutNode tree into a DisplayList following CSS 2.1 Appendix E.

Implementations§

Source§

impl Compositor

Source

pub const MAX_COMPOSITOR_DEPTH: usize = 1024

Maximum allowable recursion depth for stacking context and layout node display list composition.

Source

pub fn build_display_list(root: &LayoutNode) -> DisplayList

Compiles a layout tree root into an ordered DisplayList.

Source

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.

Source

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.

Source

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.

Source

pub fn paint_stacking_context_culled( node: &LayoutNode, list: &mut DisplayList, cull: Option<Rect>, )

Paints a stacking context with optional spatial viewport culling.

Source

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.

Source

pub fn paint_node_content(node: &LayoutNode, list: &mut DisplayList)

Paints an in-flow non-stacking-context node and its recursive children.

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,