NativeCanvasDriver

Version-owned GPU operations borrowed by one render-thread canvas device.

Every call runs on the device construction thread; implementations must not retain a screen or a retained node. Targets contain ordinary nearest-sampled RGBA8 straight-alpha color, normalized to a top-left origin. A returned target remains owned by the device until physical destruction. A partial allocation whose rollback fails is transferred with NativeCanvasAllocationFailure, retaining its reserved permit. No operation performs a CPU readback.

Functions

Link copied to clipboard
abstract fun createTarget(physicalSize: IntSize, depth: Boolean): NativeCanvasTarget

Allocates one target set after its lifetime permit has already been reserved.

Link copied to clipboard
open fun drainRetirements()

Drains deferred native destruction during terminal device shutdown after submitted work has completed and resources have been closed.

Link copied to clipboard
abstract fun fence(): NativeCanvasFence

Records a completion fence after all GPU work issued so far on the device queue.

Link copied to clipboard
abstract fun finish()

Submits as required and completes all recorded GPU work during terminal device shutdown only.