Skip to main content

Module scene_builder

Module scene_builder 

Source
Expand description

Building and updating the render graph from the layout tree.

Structs§

GraphUpdateReport
The outcome of a scoped update together with its effect on hit testing.

Enums§

GraphRebuildReason
Why a scoped scene update could not be applied, forcing the caller to throw the render graph away and build it again from the applier.
GraphUpdate
The outcome of a scoped scene update.

Functions§

build_graph_from_applier
Builds the render graph of the layout tree below root by reading nodes from applier. Returns None when root cannot be lowered to a layer.
build_graph_from_layout_tree
Builds the render graph of the layout box tree rooted at root.
expand_text_bounds_for_baseline_shift
Grows text_bounds in the direction of the style’s baseline shift, by the shift in pixels at font_size, so a clip does not cut the shifted glyphs. Returns the bounds unchanged when there is no baseline shift.
rebuild_graph_from_applier
Builds root’s graph again, its layers taking the allocations of previous, the graph it replaces.
update_graph_from_applier
Applies updates to graph in place. Returns false when the update could not be applied and the graph must be built again.
update_graph_from_applier_report
Like update_graph_from_applier, and also reports whether the hit targets must be collected again or why the graph must be rebuilt.