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

Commit ea4fdd4b authored by Jesse Hall's avatar Jesse Hall
Browse files

Don't swallow eglCreateContext errors

If the implementation eglCreateContext failed, we called
eglGetError(), so we could check that it set the EGL error properly.
But since we'd already called this, when the app called eglGetError()
it would get EGL_SUCCESS!

Bug: 10181333
Change-Id: Ic45d3a8fcb8c4421e04844c6d2f52761790b5948
parent 96a7dc08
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -552,12 +552,6 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
                GLTrace_eglCreateContext(version, c);
                GLTrace_eglCreateContext(version, c);
#endif
#endif
            return c;
            return c;
        } else {
            EGLint error = eglGetError();
            ALOGE_IF(error == EGL_SUCCESS,
                    "eglCreateContext(%p, %p, %p, %p) returned EGL_NO_CONTEXT "
                    "but no EGL error!",
                    dpy, config, share_list, attrib_list);
        }
        }
    }
    }
    return EGL_NO_CONTEXT;
    return EGL_NO_CONTEXT;