public class EglSurfaceBaseKhronos extends java.lang.Object implements IEglSurfaceBase
| Modifier and Type | Field and Description |
|---|---|
protected EglCoreKhronos |
mEglCore |
protected javax.microedition.khronos.egl.EGLSurface |
mEGLSurface |
protected static java.lang.String |
TAG |
| Modifier | Constructor and Description |
|---|---|
protected |
EglSurfaceBaseKhronos(EglCoreKhronos eglCore) |
| Modifier and Type | Method and Description |
|---|---|
void |
createOffscreenSurface(int width,
int height)
Creates an off-screen surface.
|
void |
createWindowSurface(java.lang.Object surface)
Creates a window surface.
|
javax.microedition.khronos.egl.EGLSurface |
getEGLSurface() |
int |
getHeight()
Returns the surface's height, in pixels.
|
int |
getWidth()
Returns the surface's width, in pixels.
|
boolean |
isCurrent() |
void |
makeCurrent()
Makes our EGL context and surface current.
|
void |
makeCurrentReadFrom(java.lang.Object readSurface) |
void |
releaseEglSurface()
Release the EGL surface.
|
void |
setPresentationTime(long nsecs)
Sends the presentation time stamp to EGL.
|
boolean |
swapBuffers()
Calls eglSwapBuffers.
|
protected static final java.lang.String TAG
protected EglCoreKhronos mEglCore
protected javax.microedition.khronos.egl.EGLSurface mEGLSurface
protected EglSurfaceBaseKhronos(EglCoreKhronos eglCore)
public void createWindowSurface(java.lang.Object surface)
createWindowSurface in interface IEglSurfaceBasesurface - May be a Surface or SurfaceTexture.public void createOffscreenSurface(int width,
int height)
createOffscreenSurface in interface IEglSurfaceBasepublic int getWidth()
If this is called on a window surface, and the underlying surface is in the process of changing size, we may not see the new size right away (e.g. in the "surfaceChanged" callback). The size should match after the next buffer swap.
getWidth in interface IEglSurfaceBasepublic int getHeight()
getHeight in interface IEglSurfaceBasepublic void releaseEglSurface()
releaseEglSurface in interface IEglSurfaceBasepublic void makeCurrent()
makeCurrent in interface IEglSurfaceBasepublic boolean isCurrent()
isCurrent in interface IEglSurfaceBasepublic void makeCurrentReadFrom(java.lang.Object readSurface)
makeCurrentReadFrom in interface IEglSurfaceBasepublic boolean swapBuffers()
swapBuffers in interface IEglSurfaceBasepublic void setPresentationTime(long nsecs)
setPresentationTime in interface IEglSurfaceBasensecs - Timestamp, in nanoseconds.public javax.microedition.khronos.egl.EGLSurface getEGLSurface()