EglWindowSurface(eglCore: EglCore, surface: <ERROR CLASS>, releaseSurface: Boolean = false)
Set releaseSurface to true if you want the Surface to be released when release() is called. This is convenient, but can interfere with framework classes that expect to manage the Surface themselves (e.g. if you release a SurfaceView's Surface, the surfaceDestroyed() callback won't fire).
EglWindowSurface(eglCore: EglCore, surfaceTexture: <ERROR CLASS>)
Associates an EGL surface with the SurfaceTexture.