Eina_Bool eng_outbuf_region_first_rect(Outbuf *ob) { glsym_evas_gl_preload_render_lock(eng_preload_make_current, ob); eng_window_use(ob); if (!_re_wincheck(ob)) return EINA_TRUE; glsym_evas_gl_common_context_flush(ob->gl_context); glsym_evas_gl_common_context_newframe(ob->gl_context); return EINA_FALSE; }
void eng_window_use(Outbuf *gw) { Eina_Bool force = EINA_FALSE; glsym_evas_gl_preload_render_lock(eng_preload_make_current, gw); if ((gw) && (!gw->gl_context)) return; if (_evas_gl_wl_window) { if (eglGetCurrentContext() != _evas_gl_wl_window->egl_context) force = EINA_TRUE; } if ((_evas_gl_wl_window != gw) || (force)) { if (_evas_gl_wl_window) { glsym_evas_gl_common_context_use(_evas_gl_wl_window->gl_context); glsym_evas_gl_common_context_flush(_evas_gl_wl_window->gl_context); } _evas_gl_wl_window = gw; if (gw) { if (gw->egl_surface != EGL_NO_SURFACE) { if (eglMakeCurrent(gw->egl_disp, gw->egl_surface, gw->egl_surface, gw->egl_context) == EGL_FALSE) ERR("eglMakeCurrent() failed!"); } } } if (gw) { glsym_evas_gl_common_context_use(gw->gl_context); glsym_evas_gl_common_context_resize(gw->gl_context, gw->w, gw->h, gw->rot); } }