GlTextureFrame
@ExperimentalApi
class GlTextureFrame
A frame that wraps a GlTextureInfo.
Summary
Nested types |
|---|
class GlTextureFrame.BuilderA builder for |
Constants |
|
|---|---|
const GlTextureFrame! |
Public functions |
|
|---|---|
GlTextureFrame.Builder! |
Returns a |
Unit |
release(releaseFence: SyncFenceWrapper?)Releases the frame and its underlying resources. |
Unit |
retain()Increases the reference count of this frame. |
Public properties |
|
|---|---|
Long |
The OpenGL fence sync object (a |
Format! |
The format of the frame. |
GlTextureInfo! |
The |
ImmutableMap<String!, Any!>! |
|
Long |
The presentation time of the frame, in microseconds. |
Consumer<GlTextureInfo!>! |
The |
Executor! |
The |
Long |
The release time of the frame, in nanoseconds. |
Constants
Public functions
buildUpon
fun buildUpon(): GlTextureFrame.Builder!
Returns a Builder initialized with the values of this instance.
release
fun release(releaseFence: SyncFenceWrapper?): Unit
Releases the frame and its underlying resources.
This implementation is idempotent if called after the frame has already been released. It will strictly release the underlying resources only when the count transitions from 1 to 0.
| Parameters | |
|---|---|
releaseFence: SyncFenceWrapper? |
A |
retain
fun retain(): Unit
Increases the reference count of this frame. For every call to this method there must be an extra release call before this frame is released.
| Throws | |
|---|---|
java.lang.IllegalStateException |
if called after the frame has been released. |
Public properties
fenceSync
val fenceSync: Long
The OpenGL fence sync object (a createGlSyncFence handle) associated with this frame. See
If this texture is read in an OpenGL context different to the one it was written to, call awaitSyncObject on this fence before reading the glTextureInfo, to ensure the contents have been fully written to.
Callers must *not* delete this fence, as it may be reused up until this frame is released.
The value is GL_FENCE_SYNC_UNSET if no fence has been created for this texture, as it is only expected to be produced and consumed within the same GL command stream.
presentationTimeUs
val presentationTimeUs: Long
The presentation time of the frame, in microseconds.
releaseTextureCallback
val releaseTextureCallback: Consumer<GlTextureInfo!>!
The Consumer to call to release the texture.
releaseTextureExecutor
val releaseTextureExecutor: Executor!
The Executor on which the releaseTextureCallback is called.