public class WindowSurfaceKhronos extends EglSurfaceBaseKhronos implements IWindowSurface
mEglCore, mEGLSurface, TAG| Modifier | Constructor and Description |
|---|---|
protected |
WindowSurfaceKhronos(EglCoreKhronos eglCore,
android.view.Surface surface)
Associates an EGL surface with the SurfaceTexture.
|
protected |
WindowSurfaceKhronos(EglCoreKhronos eglCore,
android.view.SurfaceHolder holder,
boolean releaseSurface)
Associates an EGL surface with the native window surface.
|
protected |
WindowSurfaceKhronos(EglCoreKhronos eglCore,
android.graphics.SurfaceTexture surfaceTexture)
Associates an EGL surface with the SurfaceTexture.
|
| Modifier and Type | Method and Description |
|---|---|
void |
recreate(java.lang.Object newEglCore)
Recreate 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, isCurrent, makeCurrent, makeCurrentReadFrom, releaseEglSurface, setPresentationTime, swapBuffersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateOffscreenSurface, createWindowSurface, getHeight, getWidth, isCurrent, makeCurrent, makeCurrentReadFrom, releaseEglSurface, setPresentationTime, swapBuffersprotected WindowSurfaceKhronos(EglCoreKhronos eglCore, android.view.SurfaceHolder holder, boolean releaseSurface)
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).
protected WindowSurfaceKhronos(EglCoreKhronos eglCore, android.graphics.SurfaceTexture surfaceTexture)
protected WindowSurfaceKhronos(EglCoreKhronos eglCore, android.view.Surface surface)
public void release()
Does not require that the surface's EGL context be current.
release in interface IWindowSurfacepublic void recreate(java.lang.Object newEglCore)
This is useful when we want to update the EGLSurface associated with a Surface. For example, if we want 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, e.g. it's still current on a context somewhere, the create call will fail with complaints from the Surface about already being connected.
recreate in interface IWindowSurface