Commit 722722d8 by sofijajvc Committed by Oliver Woodman

Fix GL error logging

Log only if an error occured.

PiperOrigin-RevId: 272618322
parent 32afc333
...@@ -42,7 +42,7 @@ public final class GlUtil { ...@@ -42,7 +42,7 @@ public final class GlUtil {
int lastError = GLES20.GL_NO_ERROR; int lastError = GLES20.GL_NO_ERROR;
int error; int error;
while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
Log.e(TAG, "glError " + gluErrorString(lastError)); Log.e(TAG, "glError " + gluErrorString(error));
lastError = error; lastError = error;
} }
if (ExoPlayerLibraryInfo.GL_ASSERTIONS_ENABLED && lastError != GLES20.GL_NO_ERROR) { if (ExoPlayerLibraryInfo.GL_ASSERTIONS_ENABLED && lastError != GLES20.GL_NO_ERROR) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment