diff options
author | Jack Palevich <jackpal@google.com> | 2009-11-25 14:04:14 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-25 14:04:14 -0800 |
commit | 85a9498a2f33d62a4313a3561b5468456974696e (patch) | |
tree | d253b0415c7ba791e2478ee6f1e527beb2323e0b /opengl/java/android | |
parent | 03c185bf763fd2a289131d64e4b14d4a5461d80f (diff) | |
parent | 9c0b39c47efade5ee2303a8f8ffbd9cf87c2c841 (diff) | |
download | frameworks_base-85a9498a2f33d62a4313a3561b5468456974696e.zip frameworks_base-85a9498a2f33d62a4313a3561b5468456974696e.tar.gz frameworks_base-85a9498a2f33d62a4313a3561b5468456974696e.tar.bz2 |
am 9c0b39c4: am ca00dee2: Merge change I5aa3adcf into eclair
Merge commit '9c0b39c47efade5ee2303a8f8ffbd9cf87c2c841' into eclair-mr2-plus-aosp
* commit '9c0b39c47efade5ee2303a8f8ffbd9cf87c2c841':
Improve the exception message text by including eglGetError().
Diffstat (limited to 'opengl/java/android')
-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 df5f96e..8954ec6 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -880,7 +880,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"); } /* @@ -888,7 +888,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(); @@ -947,6 +947,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; |