-
public final class RiveSurfaceA collection of four surface properties needed for rendering.
An Android Surface, provided by an Android SurfaceTextureListener
An EGLSurface, created from the Surface
A Rive render target, created natively which renders to the GL framebuffer
A draw key, which uniquely identifies draw operations in the CommandQueue
It also stores the width and height of the surface.
It assumes ownership of all resources and should be disposed when no longer needed.
-
-
Field Summary
Fields Modifier and Type Field Description private final Surfacesurfaceprivate final EGLSurfaceeglSurfaceprivate final LongrenderTargetPointerprivate final DrawKeydrawKeyprivate final Integerwidthprivate final Integerheight
-
Constructor Summary
Constructors Constructor Description RiveSurface(Surface surface, EGLSurface eglSurface, EGLDisplay display, Long renderTargetPointer, DrawKey drawKey, Integer width, Integer height)
-
Method Summary
Modifier and Type Method Description final SurfacegetSurface()final EGLSurfacegetEglSurface()final LonggetRenderTargetPointer()final DrawKeygetDrawKey()final IntegergetWidth()final IntegergetHeight()final Unitdispose()Dispose of the RiveSurface and free its resources. -
-
Constructor Detail
-
RiveSurface
RiveSurface(Surface surface, EGLSurface eglSurface, EGLDisplay display, Long renderTargetPointer, DrawKey drawKey, Integer width, Integer height)
- Parameters:
surface- The Android Surface that will be used for rendering.eglSurface- The EGLSurface created from the Android Surface.display- The EGLDisplay used to create the EGLSurface.renderTargetPointer- The native pointer to the Rive render target.drawKey- The key used to uniquely identify the draw operation in the CommandQueue.width- The width of the surface in pixels.height- The height of the surface in pixels.
-
-
Method Detail
-
getSurface
final Surface getSurface()
-
getEglSurface
final EGLSurface getEglSurface()
-
getRenderTargetPointer
final Long getRenderTargetPointer()
-
getDrawKey
final DrawKey getDrawKey()
-
-
-
-