FrameBufferRenderer.RenderCallback
public interface FrameBufferRenderer.RenderCallback
Callbacks invoked to render content leveraging a FrameBufferRenderer
Summary
Public methods |
|
|---|---|
abstract @NonNull FrameBuffer |
obtainFrameBuffer(@NonNull EGLSpec egl)Obtain a |
abstract void |
onDraw(@NonNull EGLManager eglManager)Draw contents into the |
abstract void |
onDrawComplete(Callback when |
Public methods
obtainFrameBuffer
abstract @NonNull FrameBuffer obtainFrameBuffer(@NonNull EGLSpec egl)
Obtain a FrameBuffer to render content into. The FrameBuffer obtained here is expected to be managed by the consumer of FrameBufferRenderer. That is implementations of this API are expected to be maintaining a reference to the returned FrameBuffer here and calling FrameBuffer.close where appropriate as the instance will not be released by FrameBufferRenderer.
| Parameters | |
|---|---|
@NonNull EGLSpec egl |
EGLSpec that is utilized within creation of the |
onDraw
abstract void onDraw(@NonNull EGLManager eglManager)
Draw contents into the HardwareBuffer. Before this method is invoked the FrameBuffer instance returned in obtainFrameBuffer is made current
onDrawComplete
abstract void onDrawComplete(
@NonNull FrameBuffer frameBuffer,
SyncFenceCompat syncFenceCompat
)
Callback when onDraw is complete and the contents of the draw are reflected in the corresponding HardwareBuffer.
| Parameters | |
|---|---|
@NonNull FrameBuffer frameBuffer |
|
SyncFenceCompat syncFenceCompat |
|