diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-06-15 12:48:37 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-06-15 15:04:20 +0200 |
commit | d74fb0dbc39a0cb72e15e0d76b4f771150f7cd75 (patch) | |
tree | 34bc004b95dca807159dde5d8f01f67049f4e9f7 | |
parent | 2982306ecea7d4ca800fb4e2b5b91fb8ba53213c (diff) | |
download | efl-d74fb0dbc39a0cb72e15e0d76b4f771150f7cd75.tar.gz |
modules: gl_x11: ensure we check the result of evas_eglMakeCurrent()
In case we fail make sure we error out to allow better debugging.
Also fix some surrounding indent.
CID: 1402693, 1402670
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11976
-rw-r--r-- | src/modules/evas/engines/gl_x11/evas_x_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c index f247758a2d..4e578efa94 100644 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c @@ -661,9 +661,10 @@ eng_window_free(Outbuf *gw) } #ifdef GL_GLES SET_RESTORE_CONTEXT(); - evas_eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!evas_eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)) + ERR("evas_eglMakeCurrent() failed!"); if (gw->egl_surface != EGL_NO_SURFACE) - eglDestroySurface(gw->egl_disp, gw->egl_surface); + eglDestroySurface(gw->egl_disp, gw->egl_surface); if (gw->egl_context != context) eglDestroyContext(gw->egl_disp, gw->egl_context); if (ref == 0) @@ -802,9 +803,10 @@ eng_window_unsurf(Outbuf *gw) if (xwin == gw) { SET_RESTORE_CONTEXT(); - evas_eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!evas_eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)) + ERR("evas_eglMakeCurrent() failed!"); if (gw->egl_surface != EGL_NO_SURFACE) - eglDestroySurface(gw->egl_disp, gw->egl_surface); + eglDestroySurface(gw->egl_disp, gw->egl_surface); gw->egl_surface = EGL_NO_SURFACE; _tls_outbuf_set(NULL); } |