summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-10-14 21:32:11 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-15 16:20:53 +0900
commit079436d4f190faed842dce14276231a0907cba2a (patch)
tree06dd9891b7349f85082b584f485b14bdd080f7d6
parent261f083c4e7cf1f2c15cecb153d27180dc1278ee (diff)
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.c4
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)
179 179
180 if ((!context) && (!surface)) 180 if ((!context) && (!surface))
181 { 181 {
182 if (!eglGetCurrentContext() &&
183 !eglGetCurrentSurface(EGL_READ) &&
184 !eglGetCurrentSurface(EGL_DRAW))
185 return 1;
182 ret = eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); 186 ret = eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
183 if (!ret) 187 if (!ret)
184 { 188 {