Package 

Class RiveSurface


  • 
    public final class RiveSurface
    
                        

    A 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.

    • 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.