Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c0b39c4 authored by Jack Palevich's avatar Jack Palevich Committed by Android Git Automerger
Browse files

am ca00dee2: Merge change I5aa3adcf into eclair

Merge commit 'ca00dee2' into eclair-mr2

* commit 'ca00dee2':
  Improve the exception message text by including eglGetError().
parents c61b0de8 ca00dee2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;