java.lang.Object
There can be multiple surfaces associated with a single context.
protected com.android.grafika.gles.EglCore mEglCore
protected EglSurfaceBase(EglCore eglCore)
Creates a window surface.
public void createWindowSurface(Object surface)
Creates an off-screen surface.
public void createOffscreenSurface(int width,int height)
Returns the surface's width, in pixels.
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.
public int getWidth()
Returns the surface's height, in pixels.
public int getHeight()
Release the EGL surface.
public void releaseEglSurface()
Makes our EGL context and surface current.
public void makeCurrent()
Makes our EGL context and surface current for drawing, using the supplied surface for reading.
public void makeCurrentReadFrom(EglSurfaceBase readSurface)
Calls eglSwapBuffers. Use this to "publish" the current frame.
public boolean swapBuffers()
Sends the presentation time stamp to EGL.
public void setPresentationTime(long nsecs)
Saves the EGL surface to a file.
Expects that this object's EGL surface is current.
public void saveFrame(File file) throws java.io.IOException
From Class | Methods |
---|---|
java.lang.Object | getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize |