E Comp (wayland): Handle destroy & create of egl images for surface.
authorChristopher Michael <cpmichael1@comcast.net>
Mon, 23 Jan 2012 12:20:48 +0000 (12:20 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Mon, 23 Jan 2012 12:20:48 +0000 (12:20 +0000)
SVN revision: 67466

src/modules/comp/e_mod_comp_wl_surface.c

index 2a5289c..b6827b1 100644 (file)
@@ -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);