CanvasBinding

Attachment-scoped presentation state owned exclusively by one retained canvas node.

Every method runs on the node's owner thread and must not mutate session state or retain a callback-lifetime paint scope. Source notifications may only enqueue immutable revisions; the two cutoff methods transfer them before declarative frame work. Native production runs at the versioned presenter's final-layout boundary, never in these methods. A method failure propagates unchanged and causes normal retained cleanup; close must disable callbacks before attempting fallible resource cleanup.

Functions

Link copied to clipboard
open fun captureFrame()

Takes this binding's pending observation for the current frame without publishing it or invoking external callbacks.

Link copied to clipboard
abstract override fun close()

Idempotently disables this attachment and releases its owner-thread references.

Link copied to clipboard
open fun commitFrame(): Boolean

Commits the observation captured by captureFrame after every node has taken its cutoff.

Link copied to clipboard
abstract fun paint(scope: PaintScope)

Emits immutable portable image data or an immutable native identifier into the current local display list.

Link copied to clipboard
open fun project(destinationSize: IntSize): DeclarationProjection<*>?

Returns a transfer declaration for the committed source and destination, or null for local-only sources. Called after the ordinary source cutoff; implementations must not acquire resources or invoke native producers.