From 6d650eb5564fee69e4ca3c527afba9d60b0774fe Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 23 Jan 2012 12:20:48 +0000 Subject: [PATCH] E Comp (wayland): Handle destroy & create of egl images for surface. SVN revision: 67466 --- src/modules/comp/e_mod_comp_wl_surface.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/comp/e_mod_comp_wl_surface.c b/src/modules/comp/e_mod_comp_wl_surface.c index 2a5289c..b6827b1 100644 --- a/src/modules/comp/e_mod_comp_wl_surface.c +++ b/src/modules/comp/e_mod_comp_wl_surface.c @@ -38,6 +38,7 @@ e_mod_comp_wl_surface_create(int32_t x, int32_t y, int32_t width, int32_t height surface->surface.resource.client = NULL; surface->visual = WAYLAND_NONE_VISUAL; + surface->image = EGL_NO_IMAGE_KHR; surface->saved_texture = 0; surface->x = x; surface->y = y; @@ -163,6 +164,14 @@ e_mod_comp_wl_surface_destroy_surface(struct wl_resource *resource) if (ws->buffer) wl_list_remove(&ws->buffer_destroy_listener.link); + if (ws->image != EGL_NO_IMAGE_KHR) + { + Wayland_Compositor *comp; + + comp = e_mod_comp_wl_comp_get(); + comp->destroy_image(comp->egl.display, ws->image); + } + wl_list_remove(&ws->buffer_link); pixman_region32_fini(&ws->damage); -- 2.7.4