Surface Texture Surface
class SurfaceTextureSurface(surfaceTexture: SurfaceTexture, val width: Int, val height: Int) : CloseableSurface
CloseableSurface backed by a SurfaceTexture.
This owns both the temporary Surface wrapper and the SurfaceTexture. Both are intentionally retained until Rive surface destruction so there is a single teardown point ordered by the command queue.
width and height capture the creation-time size. If the SurfaceTexture later changes size, update the created RiveSurface with RiveSurface.resize instead of reusing this wrapper as a source of current dimensions.
Parameters
surface Texture
Texture source backing the created Surface.
width
Creation-time width in physical pixels.
height
Creation-time height in physical pixels.
Throws
If width or height is not positive.