NativeCanvasProducer

Attachment-owned native producer created independently for each retained canvas attachment.

The source and its authoritative state remain externally owned. Producer construction issues no GPU work; any renderer initialization belongs inside the capture's render callback after target reservation. All calls run on the device thread, outside declaration, measurement, and cached painting. An implementation must not draw into the current GUI or framebuffer.

Functions

Link copied to clipboard
abstract fun capture(): NativeCanvasCapture?

Acquires an immutable-content source lease before issuing any GPU work.

Link copied to clipboard
abstract override fun close()

Releases attachment-owned renderer resources after their last GPU use has completed.