-
public class OverlayDrawerDraws overlays through Overlay. - Provides a Canvas to be passed to the Overlay - Lets the overlay draw there: draw - Renders this into the current EGL window: render - Applies the Issue514Workaround the correct way In the future we might want to use a different approach than GlTextureDrawer, SurfaceTexture and GL_TEXTURE_EXTERNAL_OES, for example by using a regular GL_TEXTURE_2D that might be filled through glTexImage2D. The current approach has some issues, for example see Issue514Workaround.
-
-
Constructor Summary
Constructors Constructor Description OverlayDrawer(Overlay overlay, Size size)
-
Method Summary
Modifier and Type Method Description voiddraw(@NonNull() Overlay.Target target)Should be called to draw the Overlay on the given Overlay.Target. Array<float>getTransform()Returns the transform that should be used to render the drawn content. voidrender(long timestampUs)Renders the drawn content in the current EGL surface, assuming there is one. voidrelease()Releases resources. -
-
Method Detail
-
draw
void draw(@NonNull() Overlay.Target target)
Should be called to draw the Overlay on the given Overlay.Target.This will provide a working Canvas to the overlay and also update thedrawn contents to a GLES texture.
- Parameters:
target- the target
-
getTransform
Array<float> getTransform()
Returns the transform that should be used to render the drawn content.This should be called after draw and can be modified.
-
render
void render(long timestampUs)
Renders the drawn content in the current EGL surface, assuming there is one.Should be called after draw and any getTransform modification.
- Parameters:
timestampUs- frame timestamp
-
release
void release()
Releases resources.
-
-
-
-