Revert "evas gl engines - avoid getting context if possible"

This reverts commit e7771438a2.

This should fix T7764

zmike - you're right. thanks for narrowing down the commit... revert
time.
This commit is contained in:
Carsten Haitzler 2019-03-29 00:16:22 +00:00
parent bb886fb292
commit 3439134ea1
4 changed files with 5 additions and 18 deletions

View File

@ -8,7 +8,6 @@
static hwc_layer_1_t *fblayer;
static hwc_composer_device_1_t *hwcDevicePtr;
static hwc_display_contents_1_t **mList;
static unsigned char gl_context_valid = 0;
void present(void *user_data, struct ANativeWindow *window,
struct ANativeWindowBuffer *buffer)
@ -460,11 +459,10 @@ evas_outbuf_use(Outbuf *ob)
glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob);
if ((_evas_eglfs_window) && (!gl_context_valid))
if (_evas_eglfs_window)
{
if (eglGetCurrentContext() != _evas_eglfs_window->egl.context[0])
force = EINA_TRUE;
gl_context_valid = 1;
}
if ((_evas_eglfs_window != ob) || (force))
@ -639,7 +637,6 @@ evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage EINA_UNUSED, Tilebuf_
end:
glsym_evas_gl_preload_render_unlock(_evas_outbuf_make_current, ob);
gl_context_valid = 0;
}
Evas_Engine_GL_Context *

View File

@ -4,7 +4,6 @@
static Outbuf *_evas_gl_drm_window = NULL;
static EGLContext context = EGL_NO_CONTEXT;
static int win_count = 0;
static unsigned char gl_context_valid = 0;
#ifdef EGL_MESA_platform_gbm
static PFNEGLGETPLATFORMDISPLAYEXTPROC dlsym_eglGetPlatformDisplayEXT = NULL;
@ -464,11 +463,10 @@ evas_outbuf_use(Outbuf *ob)
glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob);
if ((_evas_gl_drm_window) && (!gl_context_valid))
if (_evas_gl_drm_window)
{
if (eglGetCurrentContext() != _evas_gl_drm_window->egl.context)
force = EINA_TRUE;
gl_context_valid = 1;
}
if ((_evas_gl_drm_window != ob) || (force))
@ -771,7 +769,6 @@ evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer
end:
//TODO: Need render unlock after drm page flip?
glsym_evas_gl_preload_render_unlock(_evas_outbuf_make_current, ob);
gl_context_valid = 0;
}
Evas_Engine_GL_Context *

View File

@ -38,7 +38,6 @@ static Eina_Hash *_evas_gl_visuals = NULL;
static int win_count = 0;
static Eina_Bool initted = EINA_FALSE;
static unsigned char gl_context_valid = 0;
#if 0
static double
@ -738,19 +737,17 @@ eng_window_use(Outbuf *gw)
if ((gw) && (!gw->gl_context)) return;
#ifdef GL_GLES
if ((xwin) && (!gl_context_valid))
if (xwin)
{
if ((evas_eglGetCurrentDisplay() != xwin->egl_disp) ||
(evas_eglGetCurrentContext() != xwin->egl_context))
force_use = EINA_TRUE;
gl_context_valid = 1;
}
#else
if ((xwin) && (!gl_context_valid))
if (xwin)
{
if (glXGetCurrentContext() != xwin->context)
force_use = EINA_TRUE;
gl_context_valid = 1;
}
#endif
if ((xwin != gw) || (force_use))
@ -1714,7 +1711,6 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage EINA_UNUSED, Tilebuf_R
end:
glsym_evas_gl_preload_render_unlock(eng_preload_make_current, ob);
gl_context_valid = 0;
}
Evas_Engine_GL_Context *

View File

@ -7,7 +7,6 @@ static Outbuf *_evas_gl_wl_window = NULL;
static EGLContext context = EGL_NO_CONTEXT;
static struct wl_display *display = NULL;
static int win_count = 0;
static unsigned char gl_context_valid = 0;
Outbuf *
eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap_Mode swap_mode)
@ -215,11 +214,10 @@ eng_window_use(Outbuf *gw)
glsym_evas_gl_preload_render_lock(eng_preload_make_current, gw);
if ((gw) && (!gw->gl_context)) return;
if ((_evas_gl_wl_window) && (!gl_context_valid))
if (_evas_gl_wl_window)
{
if (eglGetCurrentContext() != _evas_gl_wl_window->egl_context)
force = EINA_TRUE;
gl_context_valid = 1;
}
if ((_evas_gl_wl_window != gw) || (force))
@ -519,7 +517,6 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_
end:
glsym_evas_gl_preload_render_unlock(eng_preload_make_current, ob);
ecore_wl2_display_flush(ob->wl2_disp);
gl_context_valid = 0;
}
Evas_Engine_GL_Context *