Class SurfaceTextureWrapper


  • public class SurfaceTextureWrapper
    extends Object
    A wrapper for a SurfaceTexture that tracks whether the texture has been released.

    The engine calls SurfaceTexture.release on the platform thread, but updateTexImage is called on the raster thread. This wrapper will prevent updateTexImage calls on an abandoned texture.

    • Constructor Detail

      • SurfaceTextureWrapper

        public SurfaceTextureWrapper​(@NonNull
                                     SurfaceTexture surfaceTexture)
    • Method Detail

      • updateTexImage

        public void updateTexImage()
      • release

        public void release()
      • attachToGLContext

        public void attachToGLContext​(int texName)
      • detachFromGLContext

        public void detachFromGLContext()
      • getTransformMatrix

        public void getTransformMatrix​(float[] mtx)