From df8a3dc3628916c12f3f726c09e7f303b9066a52 Mon Sep 17 00:00:00 2001 From: huangdarwin Date: Thu, 9 Dec 2021 17:06:18 +0000 Subject: [PATCH] GL: Misc refactoring for clarity. PiperOrigin-RevId: 415279434 --- .../java/androidx/media3/transformer/FrameEditor.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/FrameEditor.java b/libraries/transformer/src/main/java/androidx/media3/transformer/FrameEditor.java index 9fd832fc33..51708ec0c6 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/FrameEditor.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/FrameEditor.java @@ -48,8 +48,7 @@ import java.io.IOException; * @param outputHeight The output height in pixels. * @param transformationMatrix The transformation matrix to apply to each frame. * @param outputSurface The {@link Surface}. - * @param debugViewProvider Provider for optional debug views to show intermediate output, for - * debugging. + * @param debugViewProvider Provider for optional debug views to show intermediate output. * @return A configured {@code FrameEditor}. */ public static FrameEditor create( @@ -259,12 +258,10 @@ import java.io.IOException; inputSurface.release(); } - /** - * Focuses the specified surface with the specified width and height, then draws a four-vertex - * triangle strip (which is a quadrilateral). - */ + /** Focuses the specified surface with the specified width and height, then draws a quad. */ private void focusAndDrawQuad(EGLSurface eglSurface, int width, int height) { GlUtil.focusSurface(eglDisplay, eglContext, eglSurface, width, height); + // The four-vertex triangle strip forms a quad. GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, /* first= */ 0, /* count= */ 4); } }