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:
- 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.
- 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).
- 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.
- 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.
- Mixed-in types
Constructors
- PipelineOwner({VoidCallback? onNeedVisualUpdate, VoidCallback? onSemanticsOwnerCreated, SemanticsUpdateCallback? onSemanticsUpdate, VoidCallback? onSemanticsOwnerDisposed})
- Creates a pipeline owner.
Properties
- debugDoingLayout → bool
-
Whether this pipeline is currently in the layout phase.
no setter
- debugDoingPaint → bool
-
Whether this pipeline is currently in the paint phase.
no setter
- debugOutstandingSemanticsHandles → int
-
Deprecated.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onNeedVisualUpdate → VoidCallback?
-
Called when a render object associated with this pipeline owner wishes to
update its visual appearance.
final
- onSemanticsOwnerCreated → VoidCallback?
-
Called whenever this pipeline owner creates a semantics object.
final
- onSemanticsOwnerDisposed → VoidCallback?
-
Called whenever this pipeline owner disposes its semantics owner.
final
- onSemanticsUpdate → SemanticsUpdateCallback?
-
Called whenever this pipeline owner's semantics owner emits a SemanticsUpdate.
final
- rootNode ↔ RenderObject?
-
The unique object managed by this pipeline that has no parent.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticsOwner → SemanticsOwner?
-
The object that is managing semantics for this pipeline owner, if any.
no setter
Methods
-
adoptChild(
PipelineOwner child) → void -
Adds
child
to this PipelineOwner. -
attach(
PipelineManifold manifold) → void - Mark this PipelineOwner as attached to the given PipelineManifold.
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
override
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
detach(
) → void - Mark this PipelineOwner as detached.
-
dispose(
) → void - Release any resources held by this pipeline owner.
-
dropChild(
PipelineOwner child) → void - Removes a child PipelineOwner previously added via adoptChild.
-
ensureSemantics(
{VoidCallback? listener}) → SemanticsHandle - Deprecated.
-
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.
inherited
-
requestVisualUpdate(
) → void - Calls onNeedVisualUpdate if onNeedVisualUpdate is not null.
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
visitChildren(
PipelineOwnerVisitor visitor) → void -
Calls
visitor
for each immediate child of this PipelineOwner.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited