open class EglOffscreenSurface : EglSurface
A pbuffer EGL surface.
EglOffscreenSurface(eglCore: EglCore, width: Int, height: Int)
A pbuffer EGL surface. |
var eglCore: EglCore |
|
var eglSurface: EGLSurface |
fun getHeight(): Int
Returns the surface's height, in pixels. |
|
fun getWidth(): Int
Returns the surface's width, in pixels. |
|
fun isCurrent(): Boolean
Whether this surface is current on the attached EglCore. |
|
fun makeCurrent(): Unit
Makes our EGL context and surface current. fun makeCurrent(readSurface: EglSurface): Unit
Makes our EGL context and surface current for drawing, using the supplied surface for reading. |
|
fun makeNothingCurrent(): Unit
Makes no surface current for the attached eglCore. |
|
open fun release(): Unit
Release the EGL surface. |
|
fun setHeight(height: Int): Unit
Can be called by subclasses whose height is guaranteed to never change, so we can cache this value. For window surfaces, this should not be called. |
|
fun setPresentationTime(nsecs: Long): Unit
Sends the presentation time stamp to EGL. nsecs is the timestamp in nanoseconds. |
|
fun setWidth(width: Int): Unit
Can be called by subclasses whose width is guaranteed to never change, so we can cache this value. For window surfaces, this should not be called. |
|
fun toByteArray(format: CompressFormat = Bitmap.CompressFormat.PNG): ByteArray
Saves the EGL surface to given format. Expects that this object's EGL surface is current. |
|
fun toFile(file: File, format: CompressFormat = Bitmap.CompressFormat.PNG): Unit
Saves the EGL surface to a file. Expects that this object's EGL surface is current. |
|
fun toOutputStream(stream: OutputStream, format: CompressFormat = Bitmap.CompressFormat.PNG): Unit
Saves the EGL surface to the given output stream. Expects that this object's EGL surface is current. |