summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2012-03-15 11:50:45 -0700
committerJack Palevich <jackpal@google.com>2012-03-15 11:50:45 -0700
commit48a59c3d852867f13da4138ed2de94044febb99e (patch)
treeca10c17f3ea1c968deb43703dac57b003a3c0d7e /opengl
parent6c25ffb77069a9f39884b8e91e1810254c3e2f03 (diff)
downloadframeworks_base-48a59c3d852867f13da4138ed2de94044febb99e.zip
frameworks_base-48a59c3d852867f13da4138ed2de94044febb99e.tar.gz
frameworks_base-48a59c3d852867f13da4138ed2de94044febb99e.tar.bz2
Ignore EGL_BAD_CURRENT_SURFACE errors from eglSwapBuffers
Certain EGL device drivers are generating this error, so we need to survive it. (It's not clear from the EGL spec whether this is a legitimate error code, but since it's being generated we need to handle it.) Remove logging of expected errors from elSwapBuffers. We expect these errors to happen, and are handeling them by ignoring them. No need to clutter the logs. Bug: 6083241 Change-Id: If17dcfbb68d3009b92cf95a448728ccb47023b51
Diffstat (limited to 'opengl')
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 8e2294c..d9501a2 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -1145,11 +1145,15 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
switch(error) {
case EGL11.EGL_CONTEXT_LOST:
return false;
+ case EGL10.EGL_BAD_CURRENT_SURFACE:
+ // The current surface is bad, probably because the window manager has closed
+ // the associated window. Ignore this error, on the assumption that the
+ // application will be closed soon.
+ break;
case EGL10.EGL_BAD_NATIVE_WINDOW:
- // The native window is bad, probably because the
- // window manager has closed it. Ignore this error,
- // on the expectation that the application will be closed soon.
- Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
+ // The native window is bad, probably because the window manager has closed it.
+ // Ignore this error, on the assumption that the application will be closed
+ // soon.
break;
default:
throwEglException("eglSwapBuffers", error);