From f4298282fe4098ce553ae8c177509ad86c47a7df Mon Sep 17 00:00:00 2001 From: "Wonsik, Jung" Date: Wed, 14 Jun 2017 17:02:19 +0900 Subject: [PATCH] [EvasGL] Add to check current eglDisplay when eglMakeCurrent is called Add to check current eglDisplay when eglMakeCurrent is called. If eglWindow surface and eglContext is created twice, same eglSurfaces and eglContexts are created in each backend by Mali's core. To fix that, add checking code with current eglDisplay. Change-Id: I8f3e54d31dc8d08a6115f531e40d665cbc931635 --- src/modules/evas/engines/gl_tbm/evas_tbm_main.c | 3 ++- src/modules/evas/engines/wayland_egl/evas_wl_main.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_tbm/evas_tbm_main.c b/src/modules/evas/engines/gl_tbm/evas_tbm_main.c index ce1a558..1af328e 100755 --- a/src/modules/evas/engines/gl_tbm/evas_tbm_main.c +++ b/src/modules/evas/engines/gl_tbm/evas_tbm_main.c @@ -251,7 +251,8 @@ eng_window_use(Outbuf *gw) if (_evas_gl_wl_window) { - if (eglGetCurrentContext() != _evas_gl_wl_window->egl_context[0]) + if ((eglGetCurrentContext() != _evas_gl_wl_window->egl_context[0]) + || (eglGetCurrentDisplay() != _evas_gl_wl_window->egl_disp)) force = EINA_TRUE; } diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 4d652d2..8ffa75a 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -371,7 +371,8 @@ eng_window_use(Outbuf *gw) if (_evas_gl_wl_window) { - if (eglGetCurrentContext_thread_cmd() != _evas_gl_wl_window->egl_context[0]) + if ((eglGetCurrentContext_thread_cmd() != _evas_gl_wl_window->egl_context[0]) + || (eglGetCurrentDisplay_thread_cmd() != _evas_gl_wl_window->egl_disp)) force = EINA_TRUE; } -- 2.7.4