Closeable Surface
An owned Android Surface paired with the Android resource that backs it. Used only to create a RiveSurface with CommandQueue.createRiveSurface, which takes ownership, while also encoding resource cleanup.
Once passed to CommandQueue.createRiveSurface, the caller should not call close directly. Rather, this surface will be wrapped and owned by a RiveSurface that calls close after successful creation, or closed by CommandQueue.createRiveSurface if creation fails.
width and height are creation-time dimensions in physical pixels. They are not live properties of the backing Android resource after CommandQueue.createRiveSurface returns. Mutable surfaces, such as SurfaceTextureSurface, report later size changes through RiveSurface.resize instead of mutating this wrapper.
resizable indicates whether the Android backing resource supports in-place size changes. The created RiveSurface copies this value at construction and uses it to decide whether RiveSurface.resize is valid.
After successful creation, resource cleanup is ordered asynchronously on the command queue so that Android resources are not released until all pending commands that target the surface have completed.