mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add glClear call before drawing.
PiperOrigin-RevId: 428492031
This commit is contained in:
parent
28b8ae7076
commit
015592f534
@ -352,6 +352,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
/** Focuses the specified surface with the specified width and height, then draws a quad. */
|
||||
private void focusAndDrawQuad(EGLSurface eglSurface, int width, int height) {
|
||||
GlUtil.focusEglSurface(eglDisplay, eglContext, eglSurface, width, height);
|
||||
GLES20.glClearColor(/* red= */ 0, /* green= */ 0, /* blue= */ 0, /* alpha= */ 0);
|
||||
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
|
||||
// The four-vertex triangle strip forms a quad.
|
||||
GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, /* first= */ 0, /* count= */ 4);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user