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:200
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:207
Properties
var framesInFlight: Int { get }
Frames published that the renderer has not yet taken.
Sources/LavaUI/FrameSink.swift:220
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:224
var mappedBytes: Int { get }
Bytes of shared memory the arena currently maps.
Sources/LavaUI/FrameSink.swift:226
Methods
func beginFrame(minimum: FrameCapacity) -> FrameBuffers?
Not documented.
Sources/LavaUI/FrameSink.swift:228
func commit(_ written: FrameCapacity)
Not documented.
Sources/LavaUI/FrameSink.swift:242
func grow(to wanted: FrameCapacity, written: FrameCapacity) -> FrameBuffers?
Not documented.
Sources/LavaUI/FrameSink.swift:236