@@ -300,19 +300,11 @@ public void setOutputBuffer(VideoDecoderOutputBuffer outputBuffer) {
300
300
301
301
@ RequiresNonNull ("program" )
302
302
private void setupTextures () {
303
- GLES20 .glGenTextures (3 , yuvTextures , /* offset= */ 0 );
303
+ GLES20 .glGenTextures (/* n= */ 3 , yuvTextures , /* offset= */ 0 );
304
304
for (int i = 0 ; i < 3 ; i ++) {
305
305
GLES20 .glUniform1i (program .getUniformLocation (TEXTURE_UNIFORMS [i ]), i );
306
306
GLES20 .glActiveTexture (GLES20 .GL_TEXTURE0 + i );
307
- GLES20 .glBindTexture (GLES20 .GL_TEXTURE_2D , yuvTextures [i ]);
308
- GLES20 .glTexParameterf (
309
- GLES20 .GL_TEXTURE_2D , GLES20 .GL_TEXTURE_MIN_FILTER , GLES20 .GL_LINEAR );
310
- GLES20 .glTexParameterf (
311
- GLES20 .GL_TEXTURE_2D , GLES20 .GL_TEXTURE_MAG_FILTER , GLES20 .GL_LINEAR );
312
- GLES20 .glTexParameterf (
313
- GLES20 .GL_TEXTURE_2D , GLES20 .GL_TEXTURE_WRAP_S , GLES20 .GL_CLAMP_TO_EDGE );
314
- GLES20 .glTexParameterf (
315
- GLES20 .GL_TEXTURE_2D , GLES20 .GL_TEXTURE_WRAP_T , GLES20 .GL_CLAMP_TO_EDGE );
307
+ GlUtil .bindTexture (GLES20 .GL_TEXTURE_2D , yuvTextures [i ]);
316
308
}
317
309
GlUtil .checkGlError ();
318
310
}
0 commit comments