wrapBackendTexture

fun Surface.Companion.wrapBackendTexture(recorder: Recorder, backendTexture: BackendTexture, colorSpace: ColorSpace?, surfaceProps: SurfaceProps? = null): Surface?

Creates a Graphite surface that renders into a backendTexture using recorder.

Return

a surface wrapping the backend texture, or null if the surface could not be created.

Parameters

recorder

recorder used by the surface to record drawing commands.

backendTexture

backend texture that receives the rendered content.

colorSpace

color space describing how colors are interpreted, or null for no color space.

surfaceProps

optional surface properties controlling pixel geometry and rendering behavior.