createTarget

abstract fun createTarget(physicalSize: IntSize, depth: Boolean): NativeCanvasTarget(source)

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

Return

a new exclusively owned target with the requested extent.

Parameters

physicalSize

positive physical pixel extent, validated with checked arithmetic by the caller.

depth

whether to allocate a depth attachment alongside color.

Throws

when rollback has not acknowledged physical destruction, transferring the incomplete target and reserved permit, including an accepted asynchronous release request.

when allocation fails without remaining native storage or pending uses of partially allocated resources.