diff options
author | Jack Palevich <jackpal@google.com> | 2009-11-25 14:12:04 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-25 14:12:04 -0800 |
commit | 6a9a87da47bcfb032d0585f41d77abb6300ea63c (patch) | |
tree | 543acf14fcee71d9faa1c17f54aa68192d347716 /opengl | |
parent | 54b9a7c9f1b5def5ee1bde515b3fecaafc238014 (diff) | |
parent | 85a9498a2f33d62a4313a3561b5468456974696e (diff) | |
download | frameworks_base-6a9a87da47bcfb032d0585f41d77abb6300ea63c.zip frameworks_base-6a9a87da47bcfb032d0585f41d77abb6300ea63c.tar.gz frameworks_base-6a9a87da47bcfb032d0585f41d77abb6300ea63c.tar.bz2 |
am 85a9498a: am 9c0b39c4: am ca00dee2: Merge change I5aa3adcf into eclair
Merge commit '85a9498a2f33d62a4313a3561b5468456974696e'
* commit '85a9498a2f33d62a4313a3561b5468456974696e':
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 6878548..b52f5f0 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -935,7 +935,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"); } /* @@ -943,7 +943,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(); @@ -1002,6 +1002,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; |