Skip to main content

PipelineOwner

Struct PipelineOwner 

Source
pub struct PipelineOwner { /* private fields */ }
Expand description

The pipeline owner manages the rendering pipeline.

Flutter’s counterpart is PipelineOwner.

Implementations§

Source§

impl PipelineOwner

Source

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.

Source

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.

Source

pub fn root_node(self: Handle<Self>, app: &App) -> Option<AnyRenderObject>

The unique object managed by this pipeline that has no parent.

Source

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.

Source

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.

Source

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.

Source

pub fn flush_layout(self: Handle<Self>, app: &mut App)

Update the layout information for all dirty render objects.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn adopt_child( self: Handle<Self>, app: &mut App, child: Handle<PipelineOwner>, )

Adds child to this PipelineOwner.

Source

pub fn drop_child( self: Handle<Self>, app: &mut App, child: Handle<PipelineOwner>, )

Removes a child PipelineOwner previously added via adopt_child.

Source

pub fn visit_children( self: Handle<Self>, app: &App, visitor: &mut dyn FnMut(Handle<PipelineOwner>), )

Calls visitor for each immediate child of this PipelineOwner.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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>