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)
glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob);
- if (_evas_eglfs_window)
+ if ((_evas_eglfs_window) && (!gl_context_valid))
{
if (eglGetCurrentContext() != _evas_eglfs_window->egl.context[0])
force = EINA_TRUE;
+ gl_context_valid = 1;
}
if ((_evas_eglfs_window != ob) || (force))
end:
glsym_evas_gl_preload_render_unlock(_evas_outbuf_make_current, ob);
+ gl_context_valid = 0;
}
Evas_Engine_GL_Context *
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;
glsym_evas_gl_preload_render_lock(_evas_outbuf_make_current, ob);
- if (_evas_gl_drm_window)
+ if ((_evas_gl_drm_window) && (!gl_context_valid))
{
if (eglGetCurrentContext() != _evas_gl_drm_window->egl.context)
force = EINA_TRUE;
+ gl_context_valid = 1;
}
if ((_evas_gl_drm_window != ob) || (force))
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 *
static int win_count = 0;
static Eina_Bool initted = EINA_FALSE;
+static unsigned char gl_context_valid = 0;
#if 0
static double
if ((gw) && (!gw->gl_context)) return;
#ifdef GL_GLES
- if (xwin)
+ if ((xwin) && (!gl_context_valid))
{
if ((evas_eglGetCurrentDisplay() != xwin->egl_disp) ||
(evas_eglGetCurrentContext() != xwin->egl_context))
force_use = EINA_TRUE;
+ gl_context_valid = 1;
}
#else
- if (xwin)
+ if ((xwin) && (!gl_context_valid))
{
if (glXGetCurrentContext() != xwin->context)
force_use = EINA_TRUE;
+ gl_context_valid = 1;
}
#endif
if ((xwin != gw) || (force_use))
end:
glsym_evas_gl_preload_render_unlock(eng_preload_make_current, ob);
+ gl_context_valid = 0;
}
Evas_Engine_GL_Context *