pub struct PipelineOwner { /* private fields */ }Expand description
The pipeline owner manages the rendering pipeline.
Flutter’s counterpart is PipelineOwner.
Implementations§
Source§impl PipelineOwner
impl PipelineOwner
Sourcepub fn new(
app: &mut App,
on_need_visual_update: Option<Listener>,
on_flushed_paint: Option<FlushedPaintCallback>,
) -> Handle<PipelineOwner>
pub fn new( app: &mut App, on_need_visual_update: Option<Listener>, on_flushed_paint: Option<FlushedPaintCallback>, ) -> Handle<PipelineOwner>
Creates a pipeline owner.
Typically created by the binding, but can be created separately to drive off-screen render objects through the rendering pipeline.
Sourcepub fn request_visual_update(self: Handle<Self>, app: &mut App)
pub fn request_visual_update(self: Handle<Self>, app: &mut App)
Calls the on_need_visual_update callback given to new if there is
one, otherwise asks the PipelineManifold this owner is attached to.
Used to notify the pipeline owner that an associated render object wishes to update its visual appearance.
Sourcepub fn root_node(self: Handle<Self>, app: &App) -> Option<AnyRenderObject>
pub fn root_node(self: Handle<Self>, app: &App) -> Option<AnyRenderObject>
The unique object managed by this pipeline that has no parent.
Sourcepub fn set_root_node(
self: Handle<Self>,
app: &mut App,
value: Option<AnyRenderObject>,
)
pub fn set_root_node( self: Handle<Self>, app: &mut App, value: Option<AnyRenderObject>, )
Sets the unique object managed by this pipeline that has no parent.
Sourcepub fn nodes_needing_layout(
self: Handle<Self>,
app: &App,
) -> Vec<AnyRenderObject>
pub fn nodes_needing_layout( self: Handle<Self>, app: &App, ) -> Vec<AnyRenderObject>
Relayout boundaries which need to be laid out in the next
flush_layout pass.
Sourcepub fn debug_doing_layout(self: Handle<Self>, app: &App) -> bool
pub fn debug_doing_layout(self: Handle<Self>, app: &App) -> bool
Whether this pipeline is currently in the layout phase.
Always false when debug assertions are disabled.
Sourcepub fn flush_layout(self: Handle<Self>, app: &mut App)
pub fn flush_layout(self: Handle<Self>, app: &mut App)
Update the layout information for all dirty render objects.
Sourcepub fn flush_compositing_bits(self: Handle<Self>, app: &mut App)
pub fn flush_compositing_bits(self: Handle<Self>, app: &mut App)
Updates the AnyRenderObject::needs_compositing bits.
Called as part of the rendering pipeline after flush_layout and
before flush_paint.
Sourcepub fn nodes_needing_paint(
self: Handle<Self>,
app: &App,
) -> Vec<AnyRenderObject>
pub fn nodes_needing_paint( self: Handle<Self>, app: &App, ) -> Vec<AnyRenderObject>
Nodes with a dirty layer or paint state, to be updated in the next
flush_paint pass.
Sourcepub fn debug_doing_paint(self: Handle<Self>, app: &App) -> bool
pub fn debug_doing_paint(self: Handle<Self>, app: &App) -> bool
Whether this pipeline is currently in the paint phase.
Only meaningful when asserts are enabled.
Sourcepub fn flush_paint(self: Handle<Self>, app: &mut App)
pub fn flush_paint(self: Handle<Self>, app: &mut App)
Update the display lists for all render objects.
This function is one of the core stages of the rendering pipeline. Painting occurs after layout and before the scene is recomposited so that scene is composited with up-to-date display lists for every render object.
A frame paints each of its views by
flush_paint_without_children instead.
Sourcepub fn flush_paint_without_children(self: Handle<Self>, app: &mut App)
pub fn flush_paint_without_children(self: Handle<Self>, app: &mut App)
flush_paint for this owner’s render objects alone: the views
anchored in a view, whose owners are its owner’s children, paint at frames of their own.
Sourcepub fn attach(
self: Handle<Self>,
app: &mut App,
manifold: Rc<dyn PipelineManifold>,
)
pub fn attach( self: Handle<Self>, app: &mut App, manifold: Rc<dyn PipelineManifold>, )
Mark this PipelineOwner as attached to the given PipelineManifold.
Typically, this is only called directly on the root PipelineOwner.
Children are automatically attached to their parent’s PipelineManifold
when adopt_child is called.
Sourcepub fn detach(self: Handle<Self>, app: &mut App)
pub fn detach(self: Handle<Self>, app: &mut App)
Mark this PipelineOwner as detached.
Typically, this is only called directly on the root PipelineOwner.
Children are automatically detached from their parent’s PipelineManifold
when drop_child is called.
Sourcepub fn adopt_child(
self: Handle<Self>,
app: &mut App,
child: Handle<PipelineOwner>,
)
pub fn adopt_child( self: Handle<Self>, app: &mut App, child: Handle<PipelineOwner>, )
Adds child to this PipelineOwner.
Sourcepub fn drop_child(
self: Handle<Self>,
app: &mut App,
child: Handle<PipelineOwner>,
)
pub fn drop_child( self: Handle<Self>, app: &mut App, child: Handle<PipelineOwner>, )
Removes a child PipelineOwner previously added via
adopt_child.
Sourcepub fn visit_children(
self: Handle<Self>,
app: &App,
visitor: &mut dyn FnMut(Handle<PipelineOwner>),
)
pub fn visit_children( self: Handle<Self>, app: &App, visitor: &mut dyn FnMut(Handle<PipelineOwner>), )
Calls visitor for each immediate child of this PipelineOwner.