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 1fe19195f9
commit 550299db9a

View file

@ -376,9 +376,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);
}
}