diff options
author | Jack Palevich <jackpal@google.com> | 2009-11-25 13:48:54 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-25 13:48:54 -0800 |
commit | ec2b40ade9aa9a130d21d1d87da1d3650d03d321 (patch) | |
tree | 18ef0d17e348f6f82b7d3a3abcee674d614d29e9 /opengl | |
parent | 31826a5ac636339abca8b0b5d97d4cd4d750794b (diff) | |
parent | ca00dee21425882619aef4ecbe3e0d08de0544e5 (diff) | |
download | frameworks_base-ec2b40ade9aa9a130d21d1d87da1d3650d03d321.zip frameworks_base-ec2b40ade9aa9a130d21d1d87da1d3650d03d321.tar.gz frameworks_base-ec2b40ade9aa9a130d21d1d87da1d3650d03d321.tar.bz2 |
am ca00dee2: Merge change I5aa3adcf into eclair
Merge commit 'ca00dee21425882619aef4ecbe3e0d08de0544e5' into eclair-plus-aosp
* commit 'ca00dee21425882619aef4ecbe3e0d08de0544e5':
Improve the exception message text by including eglGetError().
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/java/android/opengl/GLSurfaceView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index e60859b..fb3747c 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -867,7 +867,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback mEglDisplay, mEglConfig, holder); if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) { - throw new RuntimeException("createWindowSurface failed"); + throwEglException("createWindowSurface"); } /* @@ -875,7 +875,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback * the context is current and bound to a surface. */ if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) { - throw new RuntimeException("eglMakeCurrent failed."); + throwEglException("eglMakeCurrent"); } GL gl = mEglContext.getGL(); @@ -934,6 +934,10 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } } + private void throwEglException(String function) { + throw new RuntimeException(function + " failed: " + mEgl.eglGetError()); + } + EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; |