Aller au contenu

Companion

object Companion

Functions

wrapBorrowed

fun wrapBorrowed(handler: WGPUTexture): Texture
Wraps a texture owned by someone else (for example the canvas of a [`CanvasSurface`](../../-canvas-surface/index.md)): [`Texture.close`](../index.md#close) only releases the wrapper, never the handle. The caller must not rely on the wrapper to keep the source resource alive.

wrapOwned

fun wrapOwned(handler: WGPUTexture): Texture
Wraps a texture whose destruction is transferred to the wrapper: [`Texture.close`](../index.md#close) destroys the handle. No new texture is created.