forked from enlightenment/efl
egl actually doesnt need a full reset - we CAN get the current context
and draw/read surfaces. SVN revision: 55977
This commit is contained in:
parent
13df30ab2b
commit
d7e8cfba62
|
@ -541,7 +541,11 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
/* get the upate rect surface - return engine data as dummy */
|
/* get the upate rect surface - return engine data as dummy */
|
||||||
if (!re->win->draw.redraw) return NULL;
|
if (!re->win->draw.redraw) return NULL;
|
||||||
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
|
// dont need to for egl - eng_window_use() can check for other ctxt's
|
||||||
|
#else
|
||||||
eng_window_use(NULL);
|
eng_window_use(NULL);
|
||||||
|
#endif
|
||||||
eng_window_use(re->win);
|
eng_window_use(re->win);
|
||||||
if (!_re_wincheck(re)) return NULL;
|
if (!_re_wincheck(re)) return NULL;
|
||||||
evas_gl_common_context_flush(re->win->gl_context);
|
evas_gl_common_context_flush(re->win->gl_context);
|
||||||
|
|
|
@ -477,7 +477,22 @@ eng_window_free(Evas_GL_X11_Window *gw)
|
||||||
void
|
void
|
||||||
eng_window_use(Evas_GL_X11_Window *gw)
|
eng_window_use(Evas_GL_X11_Window *gw)
|
||||||
{
|
{
|
||||||
if (_evas_gl_x11_window != gw)
|
Eina_Bool force_use = EINA_FALSE;
|
||||||
|
|
||||||
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
|
if (_evas_gl_x11_window)
|
||||||
|
{
|
||||||
|
if ((eglGetCurrentContext() !=
|
||||||
|
_evas_gl_x11_window->egl_context[0]) ||
|
||||||
|
(eglGetCurrentSurface(EGL_READ) !=
|
||||||
|
_evas_gl_x11_window->egl_surface[0]) ||
|
||||||
|
(eglGetCurrentSurface(EGL_DRAW) !=
|
||||||
|
_evas_gl_x11_window->egl_surface[0]))
|
||||||
|
force_use = EINA_TRUE;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
if ((_evas_gl_x11_window != gw) || (force_use))
|
||||||
{
|
{
|
||||||
if (_evas_gl_x11_window)
|
if (_evas_gl_x11_window)
|
||||||
evas_gl_common_context_flush(_evas_gl_x11_window->gl_context);
|
evas_gl_common_context_flush(_evas_gl_x11_window->gl_context);
|
||||||
|
@ -488,13 +503,13 @@ eng_window_use(Evas_GL_X11_Window *gw)
|
||||||
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
|
||||||
if (gw->egl_surface[0] != EGL_NO_SURFACE)
|
if (gw->egl_surface[0] != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
if (eglMakeCurrent(gw->egl_disp,
|
if (eglMakeCurrent(gw->egl_disp,
|
||||||
gw->egl_surface[0],
|
gw->egl_surface[0],
|
||||||
gw->egl_surface[0],
|
gw->egl_surface[0],
|
||||||
gw->egl_context[0]) == EGL_FALSE)
|
gw->egl_context[0]) == EGL_FALSE)
|
||||||
{
|
{
|
||||||
ERR("eglMakeCurrent() failed!");
|
ERR("eglMakeCurrent() failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// GLX
|
// GLX
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue