class ArenaFrameSink
Swift
final class ArenaFrameSink
Publishes frames into a DrawArena for a renderer in another process.
The producer creates the arena and the renderer attaches to it, so a client makes one of these before asking for a surface — the compositor opens what the producer made, which is what keeps the arena's capacity and geometry the producer's business alone.
onPublish is called after each commit, on the frame loop's own thread.
It exists because a shared-memory store wakes nobody: the arena's published
sequence is the authority on what is current, but somebody still has to say
"come and look". That is Compositor.Present, and it stays out of here
because LavaUI does not know what a compositor is.
Sources/LavaUI/FrameSink.swift:187
Constructors
init?(id: String, capacity: FrameCapacity = FrameCapacity(
commands: 1024, glyphs: 4096, meshVertices: 1024,
spatialVertices: 1024, gradients: 64
), onPublish: @escaping () -> Void = {})
Creates the arena named id. Returns nil if one by that name already
exists, which is what stops two producers from writing over each other.
Sources/LavaUI/FrameSink.swift:194
Properties
var framesInFlight: Int { get }
Not documented.
Sources/LavaUI/FrameSink.swift:206
var generation: UInt32 { get }
Name the renderer attaches by, and what the arena has grown to — both only for logging and tests.
Sources/LavaUI/FrameSink.swift:210
var mappedBytes: Int { get }
Not documented.
Sources/LavaUI/FrameSink.swift:211
Methods
func beginFrame(minimum: FrameCapacity) -> FrameBuffers?
Not documented.
Sources/LavaUI/FrameSink.swift:213
func commit(_ written: FrameCapacity)
Not documented.
Sources/LavaUI/FrameSink.swift:227
func grow(to wanted: FrameCapacity, written: FrameCapacity) -> FrameBuffers?
Not documented.
Sources/LavaUI/FrameSink.swift:221