Package 

Class RiveEGLSurface

  • All Implemented Interfaces:
    app.rive.core.CheckableAutoCloseable , java.lang.AutoCloseable

    
    public final class RiveEGLSurface
    extends RiveSurface implements AutoCloseable
                        

    A collection of four surface properties needed for rendering.

    • An Android SurfaceTexture, provided by an Android SurfaceTextureListener

    • An EGLSurface, created from a Surface which is is in turn created from the SurfaceTexture

    • A Rive render target, created natively which renders to the GL framebuffer

    • A draw key, which uniquely identifies draw operations in the CommandQueue

    Meant for use with and created from a RenderContextGL.

    It also stores the width and height of the surface.

    ⚠️ This class assumes ownership of all resources and should be closed using CommandQueue.destroyRiveSurface when no longer needed.

    • Constructor Detail

      • RiveEGLSurface

        RiveEGLSurface(SurfaceTexture surfaceTexture, EGLSurface eglSurface, EGLDisplay display, Long renderTargetPointer, DrawKey drawKey, Integer width, Integer height)
        Parameters:
        surfaceTexture - The Android SurfaceTexture to render against, likely created from a TextureView.
        eglSurface - The EGLSurface created from the Android Surface.
        display - The EGLDisplay used to create the EGLSurface, used for destroying it.
        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.