summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-07 16:59:43 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-07 16:59:43 +0100
commit064b46b7a3ab223c2453628d22ae80db5868b2c6 (patch)
tree7fc0dc2dc8ae01a2549fbf0256abaca6ea151926 /src/modules
parent8e67e9d18e2d0862d86cbe7c4c6e319977054510 (diff)
evas egl - esnure we always destroy surfaces because creating new ones
be sure we dont leak them.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/eglfs/evas_outbuf.c2
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c2
-rw-r--r--src/modules/evas/engines/gl_x11/evas_x_main.c2
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/evas/engines/eglfs/evas_outbuf.c b/src/modules/evas/engines/eglfs/evas_outbuf.c
index ba732861ab..958ea7751a 100644
--- a/src/modules/evas/engines/eglfs/evas_outbuf.c
+++ b/src/modules/evas/engines/eglfs/evas_outbuf.c
@@ -296,6 +296,8 @@ _evas_outbuf_egl_setup(Outbuf *ob)
296 ob->egl.config = cfgs[0]; 296 ob->egl.config = cfgs[0];
297 297
298 EGLNativeWindowType win = create_hwcomposernativewindow(); 298 EGLNativeWindowType win = create_hwcomposernativewindow();
299 if (ob->egl.surface[0] != EGL_NO_SURFACE)
300 eglDestroySurface(ob->egl.disp, ob->egl.surface[0]);
299 ob->egl.surface[0] = 301 ob->egl.surface[0] =
300 eglCreateWindowSurface(ob->egl.disp, ob->egl.config, 302 eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
301 (EGLNativeWindowType)win, NULL); 303 (EGLNativeWindowType)win, NULL);
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index f478da9885..4fe4a7f30c 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -502,6 +502,8 @@ evas_outbuf_resurf(Outbuf *ob)
502 if (ob->surf) return; 502 if (ob->surf) return;
503 if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", ob); 503 if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", ob);
504 504
505 if (ob->egl.surface != EGL_NO_SURFACE)
506 eglDestroySurface(ob->egl.disp, ob->egl.surface);
505 ob->egl.surface = 507 ob->egl.surface =
506 eglCreateWindowSurface(ob->egl.disp, ob->egl.config, 508 eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
507 (EGLNativeWindowType)ob->surface, NULL); 509 (EGLNativeWindowType)ob->surface, NULL);
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 6bf74af556..8c304784e6 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -824,6 +824,8 @@ eng_window_resurf(Outbuf *gw)
824 if (gw->surf) return; 824 if (gw->surf) return;
825 if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw); 825 if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw);
826#ifdef GL_GLES 826#ifdef GL_GLES
827 if (gw->egl_surface)
828 eglDestroySurface(gw->egl_disp, gw->egl_surface);
827 gw->egl_surface = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, 829 gw->egl_surface = eglCreateWindowSurface(gw->egl_disp, gw->egl_config,
828 (EGLNativeWindowType)gw->win, 830 (EGLNativeWindowType)gw->win,
829 NULL); 831 NULL);
diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
index ff78e72cca..55e6a51e24 100644
--- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c
+++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
@@ -339,6 +339,8 @@ eng_window_resurf(Outbuf *gw)
339 gw->win = wl_egl_window_create(wls, gw->h, gw->w); 339 gw->win = wl_egl_window_create(wls, gw->h, gw->w);
340 } 340 }
341 341
342 if (gw->egl_surface != EGL_NO_SURFACE)
343 eglDestroySurface(gw->egl_disp, gw->egl_surface);
342 gw->egl_surface = 344 gw->egl_surface =
343 eglCreateWindowSurface(gw->egl_disp, gw->egl_config, 345 eglCreateWindowSurface(gw->egl_disp, gw->egl_config,
344 (EGLNativeWindowType)gw->win, NULL); 346 (EGLNativeWindowType)gw->win, NULL);