summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_egl/evas_wl_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/evas/engines/wayland_egl/evas_wl_main.c')
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c25
1 files changed, 25 insertions, 0 deletions
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 9ef76705b6..00a84f81f5 100644
--- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c
+++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
@@ -223,6 +223,8 @@ eng_window_use(Evas_GL_Wl_Window *gw)
{
Eina_Bool force = EINA_FALSE;
+ evas_gl_preload_render_lock(eng_window_make_current, gw);
+
if (_evas_gl_wl_window)
{
if ((eglGetCurrentContext() !=
@@ -305,3 +307,26 @@ eng_window_resurf(Evas_GL_Wl_Window *gw)
gw->surf = EINA_TRUE;
}
+
+Eina_Bool
+eng_window_make_current(void *data, void *doit)
+{
+ Evas_GL_Wl_Window *gw;
+
+ if (!(gw = data)) return EINA_FALSE;
+
+ if (doit)
+ {
+ if (!eglMakeCurrent(gw->egl_disp, gw->egl_surface[0],
+ gw->egl_surface[0], gw->egl_context[0]))
+ return EINA_FALSE;
+ }
+ else
+ {
+ if (!eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE,
+ EGL_NO_SURFACE, EGL_NO_CONTEXT))
+ return EINA_FALSE;
+ }
+
+ return EINA_TRUE;
+}