public class WindowSurface extends EglSurfaceBase
Constructor and Description |
---|
WindowSurface(EglCore eglCore,
Surface surface,
boolean releaseSurface)
Associates an EGL surface with the native window surface.
|
WindowSurface(EglCore eglCore,
SurfaceTexture surfaceTexture)
Associates an EGL surface with the SurfaceTexture.
|
Modifier and Type | Method and Description |
---|---|
void |
recreate(EglCore newEglCore)
Re-creates the EGLSurface using the new EglBase.
|
void |
release()
Releases any resources associated with the EGL surface and, if configured to do so,
with the Surface as well.
|
createOffscreenSurface, createWindowSurface, getEglSurface, getHeight, getWidth, makeCurrent, makeCurrentReadFrom, releaseEglSurface, saveFrame, setPresentationTime, swapBuffers
public WindowSurface(EglCore eglCore, Surface surface, boolean releaseSurface)
public WindowSurface(EglCore eglCore, SurfaceTexture surfaceTexture)
public void release()
public void recreate(EglCore newEglCore)
This is useful to update the EGLSurface associated with a Surface, for example, to share with a different EGLContext, which can only be done by tearing down and recreating the context. (That's handled by the caller; this just creates a new EGLSurface for the Surface we were handed earlier.)
If the previous EGLSurface isn't fully destroyed, for example, it's still current on a context somewhere, the create call will fail with complaints from the Surface about already being connected.
© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal