Merge change I5aa3adcf into eclair
* changes: Improve the exception message text by including eglGetError().
This commit is contained in:
@@ -867,7 +867,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
|
|||||||
mEglDisplay, mEglConfig, holder);
|
mEglDisplay, mEglConfig, holder);
|
||||||
|
|
||||||
if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
|
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.
|
* the context is current and bound to a surface.
|
||||||
*/
|
*/
|
||||||
if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
|
if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
|
||||||
throw new RuntimeException("eglMakeCurrent failed.");
|
throwEglException("eglMakeCurrent");
|
||||||
}
|
}
|
||||||
|
|
||||||
GL gl = mEglContext.getGL();
|
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;
|
EGL10 mEgl;
|
||||||
EGLDisplay mEglDisplay;
|
EGLDisplay mEglDisplay;
|
||||||
EGLSurface mEglSurface;
|
EGLSurface mEglSurface;
|
||||||
|
|||||||
Reference in New Issue
Block a user