Class SurfaceOutput

  • All Implemented Interfaces:
    IOutput, java.io.Closeable, java.lang.AutoCloseable

    public class SurfaceOutput
    extends ViewOutput
    Displaying the result of work Player on the surface
    • Constructor Detail

      • SurfaceOutput

        public SurfaceOutput​(android.view.SurfaceHolder surfaceHolder)
        Create a new instance of the SurfaceOutput
        Parameters:
        surfaceHolder - any android view who can provide SurfaceHolder
    • Method Detail

      • isSurfaceAvailable

        protected boolean isSurfaceAvailable()
        Check if surface is valid
        Specified by:
        isSurfaceAvailable in class ViewOutput
        Returns:
        true if surface holds a physical surface
      • createWindowSurface

        protected WindowSurface createWindowSurface​(EglCore eglCore)
        Сreates a WindowSurface and attaches surface with given openGL state.
        Specified by:
        createWindowSurface in class ViewOutput
        Parameters:
        eglCore - EGL state
        Returns:
        created WindowSurface
      • destroyWindowSurface

        protected void destroyWindowSurface​(WindowSurface windowSurface)
        Destroys the given WindowSurface and detachs surface
        Specified by:
        destroyWindowSurface in class ViewOutput
        Parameters:
        windowSurface - surface to be destroyed
      • getSurfaceFrame

        protected android.graphics.Rect getSurfaceFrame()
        Retrieve the current size of the surface
        Specified by:
        getSurfaceFrame in class ViewOutput
        Returns:
        Rect the surface's dimensions