forked from enlightenment/efl
evas egl - esnure we always destroy surfaces because creating new ones
be sure we dont leak them.
This commit is contained in:
parent
8e67e9d18e
commit
064b46b7a3
|
@ -296,6 +296,8 @@ _evas_outbuf_egl_setup(Outbuf *ob)
|
|||
ob->egl.config = cfgs[0];
|
||||
|
||||
EGLNativeWindowType win = create_hwcomposernativewindow();
|
||||
if (ob->egl.surface[0] != EGL_NO_SURFACE)
|
||||
eglDestroySurface(ob->egl.disp, ob->egl.surface[0]);
|
||||
ob->egl.surface[0] =
|
||||
eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
|
||||
(EGLNativeWindowType)win, NULL);
|
||||
|
|
|
@ -502,6 +502,8 @@ evas_outbuf_resurf(Outbuf *ob)
|
|||
if (ob->surf) return;
|
||||
if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", ob);
|
||||
|
||||
if (ob->egl.surface != EGL_NO_SURFACE)
|
||||
eglDestroySurface(ob->egl.disp, ob->egl.surface);
|
||||
ob->egl.surface =
|
||||
eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
|
||||
(EGLNativeWindowType)ob->surface, NULL);
|
||||
|
|
|
@ -824,6 +824,8 @@ eng_window_resurf(Outbuf *gw)
|
|||
if (gw->surf) return;
|
||||
if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw);
|
||||
#ifdef GL_GLES
|
||||
if (gw->egl_surface)
|
||||
eglDestroySurface(gw->egl_disp, gw->egl_surface);
|
||||
gw->egl_surface = eglCreateWindowSurface(gw->egl_disp, gw->egl_config,
|
||||
(EGLNativeWindowType)gw->win,
|
||||
NULL);
|
||||
|
|
|
@ -339,6 +339,8 @@ eng_window_resurf(Outbuf *gw)
|
|||
gw->win = wl_egl_window_create(wls, gw->h, gw->w);
|
||||
}
|
||||
|
||||
if (gw->egl_surface != EGL_NO_SURFACE)
|
||||
eglDestroySurface(gw->egl_disp, gw->egl_surface);
|
||||
gw->egl_surface =
|
||||
eglCreateWindowSurface(gw->egl_disp, gw->egl_config,
|
||||
(EGLNativeWindowType)gw->win, NULL);
|
||||
|
|
Loading…
Reference in New Issue