Evas GL: Don't call eglMakeCurrent if already null

If the current context & surface are already null, avoid
calling eglMakeCurrent again, since it can return an error
(EGL_FALSE but with no error code, thanks Nvidia).
This commit is contained in:
Jean-Philippe Andre 2015-10-14 21:32:11 +09:00
parent 261f083c4e
commit 079436d4f1
1 changed files with 4 additions and 0 deletions

View File

@ -179,6 +179,10 @@ evgl_eng_make_current(void *data, void *surface, void *context, int flush)
if ((!context) && (!surface))
{
if (!eglGetCurrentContext() &&
!eglGetCurrentSurface(EGL_READ) &&
!eglGetCurrentSurface(EGL_DRAW))
return 1;
ret = eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (!ret)
{