diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-10-14 21:32:11 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-10-15 16:20:53 +0900 |
commit | 079436d4f190faed842dce14276231a0907cba2a (patch) | |
tree | 06dd9891b7349f85082b584f485b14bdd080f7d6 | |
parent | 261f083c4e7cf1f2c15cecb153d27180dc1278ee (diff) | |
download | efl-079436d4f190faed842dce14276231a0907cba2a.tar.gz |
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).
-rw-r--r-- | src/modules/evas/engines/gl_x11/evas_engine.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index bdbd86f937..930092dc4e 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -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) { |