PipelineOwner class

The pipeline owner manages the rendering pipeline.

The pipeline owner provides an interface for driving the rendering pipeline and stores the state about which render objects have requested to be visited in each stage of the pipeline. To flush the pipeline, call the following functions in order:

  1. flushLayout updates any render objects that need to compute their layout. During this phase, the size and position of each render object is calculated. Render objects might dirty their painting or compositing state during this phase.
  2. flushCompositingBits updates any render objects that have dirty compositing bits. During this phase, each render object learns whether any of its children require compositing. This information is used during the painting phase when selecting how to implement visual effects such as clipping. If a render object has a composited child, it needs to use a Layer to create the clip in order for the clip to apply to the composited child (which will be painted into its own Layer).
  3. flushPaint visits any render objects that need to paint. During this phase, render objects get a chance to record painting commands into PictureLayers and construct other composited Layers.
  4. Finally, if semantics are enabled, flushSemantics will compile the semantics for the render objects. This semantic information is used by assistive technology to improve the accessibility of the render tree.

The RendererBinding holds the pipeline owner for the render objects that are visible on screen. You can create other pipeline owners to manage off-screen objects, which can flush their pipelines independently of the on-screen render objects.

PipelineOwners can be organized in a tree to manage multiple render trees, where each PipelineOwner is responsible for one of the render trees. To build or modify the tree, call adoptChild or dropChild. During each of the different flush phases described above, a PipelineOwner will first perform the phase on the nodes it manages in its own render tree before calling the same flush method on its children. No assumption must be made about the order in which child PipelineOwners are flushed.

A PipelineOwner may also be attached to a PipelineManifold, which gives it access to platform functionality usually exposed by the bindings without tying it to a specific binding implementation. All PipelineOwners in a given tree must be attached to the same PipelineManifold. This happens automatically during adoptChild.


PipelineOwner({VoidCallback? onNeedVisualUpdate, VoidCallback? onSemanticsOwnerCreated, SemanticsUpdateCallback? onSemanticsUpdate, VoidCallback? onSemanticsOwnerDisposed})
Creates a pipeline owner.


debugDoingLayout bool
Whether this pipeline is currently in the layout phase.
debugDoingPaint bool
Whether this pipeline is currently in the paint phase.
debugOutstandingSemanticsHandles int
The number of clients registered to listen for semantics.
hashCode int
The hash code for this object.
onNeedVisualUpdate VoidCallback?
Called when a render object associated with this pipeline owner wishes to update its visual appearance.
onSemanticsOwnerCreated VoidCallback?
Called whenever this pipeline owner creates a semantics object.
onSemanticsOwnerDisposed VoidCallback?
Called whenever this pipeline owner disposes its semantics owner.
onSemanticsUpdate SemanticsUpdateCallback?
Called whenever this pipeline owner's semantics owner emits a SemanticsUpdate.
rootNode AbstractNode?
The unique object managed by this pipeline that has no parent.
read / write
runtimeType Type
A representation of the runtime type of the object.
semanticsOwner SemanticsOwner?
The object that is managing semantics for this pipeline owner, if any.


adoptChild(PipelineOwner child) → void
Adds child to this PipelineOwner.
attach(PipelineManifold manifold) → void
Mark this PipelineOwner as attached to the given PipelineManifold.
detach() → void
Mark this PipelineOwner as detached.
dropChild(PipelineOwner child) → void
Removes a child PipelineOwner previously added via adoptChild.
ensureSemantics({VoidCallback? listener}) SemanticsHandle
Opens a SemanticsHandle and calls listener whenever the semantics tree generated from the render tree owned by this PipelineOwner updates.
flushCompositingBits() → void
Updates the RenderObject.needsCompositing bits.
flushLayout() → void
Update the layout information for all dirty render objects.
flushPaint() → void
Update the display lists for all render objects.
flushSemantics() → void
Update the semantics for render objects marked as needing a semantics update.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
requestVisualUpdate() → void
Calls onNeedVisualUpdate if onNeedVisualUpdate is not null.
toString() String
A string representation of this object.
visitChildren(PipelineOwnerVisitor visitor) → void
Calls visitor for each immediate child of this PipelineOwner.


operator ==(Object other) bool
The equality operator.