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
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;
}
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;
}