Avoid duplicate logging of GL exceptions.

Only log GL exceptions in GlUtil if they aren't thrown. Otherwise,
it's up to the caller whether or not to log them to avoid logging them
twice.

PiperOrigin-RevId: 431657397
This commit is contained in:
hschlueter 2022-03-01 12:53:39 +00:00 committed by Ian Baker
parent 0bc9470ce5
commit c96bcbb24b

View File

@ -377,9 +377,10 @@ public final class GlUtil {
}
/* package */ static void throwGlException(String errorMsg) {
Log.e(TAG, errorMsg);
if (glAssertionsEnabled) {
throw new GlException(errorMsg);
} else {
Log.e(TAG, errorMsg);
}
}