RenderDamageTracker class final
The per-runtime record of render invalidations: whether the next frame can
differ from the last one, when to request it, and when derived screen
geometry is stale. It also numbers root paint passes, so a subtree that
stops painting can retract what it published (PaintPassParticipant).
It does not record which cells changed. The frame loop derives that by comparing each painted frame with the previous one (CellBuffer.diffAgainst), so nothing has to report damage, and a layout change needs no special handling when the frame is presented.
One instance is owned per BuildOwner/runtime: render objects publish
into the tracker attached at their tree's root, so two Fleury runtimes in
one isolate never observe each other's invalidations.
Constructors
Properties
- geometryEpoch → int
-
Advances whenever derived geometry may have changed.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasVisualChange → bool
-
Whether any invalidation has been recorded since the last rendered
frame. While false (and the buffer pool is warm), a frame request can
skip build/layout/paint entirely: the front buffer is still exact.
no setter
- onInvalidate ↔ void Function()?
-
Called when an invalidation lands that this frame cannot cover: outside
a frame, or during its paint phase. Coalescing is the callee's job.
getter/setter pair
- paintPass → int
-
The pass currently painting (or the last one, between passes).
no setter
- phase ↔ RenderFramePhase
-
The phase the owner is in; set by
BuildOwner.renderFrame.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenSize ↔ CellSize?
-
The size of the buffer the tree renders into, set by the owner before
each frame's layout. The outermost clip of every derived geometry.
getter/setter pair
Methods
-
addPaintPassListener(
void listener()) → void -
Registers
listenerto run when a paint pass ends — the point at which this frame's layout, and so every derived geometry, is final. The semantics tier re-derives node bounds here. -
beginPaintPass(
) → int - Starts a root paint pass; returns its number.
-
endPaintPass(
) → void - Ends the current pass: every participant that did not publish in it — its subtree stayed mounted but did not paint (a cached repaint boundary, the other IndexedStack tab, a route beneath an opaque one) — re-derives its fact from layout state and publishes it. Publishing an unchanged fact notifies nobody, so a participant that stays hidden costs one derivation per pass and never requests a frame.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordLayout(
) → void - Records a layout invalidation: geometry may move, so every derived geometry is recomputed and, as with recordVisualChange, the next frame renders rather than being skipped. It doesn't change which cells are presented; those are derived by comparing buffers.
-
recordVisualChange(
) → void - Records that some render object's visual output may differ next frame (audited paint-only invalidations included). Cleared when a frame consumes it via takeVisualChange.
-
registerPaintPassParticipant(
PaintPassParticipant participant) → void -
Registers
participantfor the end-of-pass sweep. Idempotent. -
removePaintPassListener(
void listener()) → void -
reset(
) → void -
takeRequiresFullDiff(
) → bool - Whether recordLayout ran since the last call (or reset), clearing the flag.
-
takeVisualChange(
) → bool -
toString(
) → String -
A string representation of this object.
inherited
-
unregisterPaintPassParticipant(
PaintPassParticipant participant) → void -
Removes
participantfrom the sweep (it left the tree, or moved to another owner).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited