|
|
@ -682,8 +682,6 @@ struct weston_frame_callback { |
|
|
|
static void |
|
|
|
static void |
|
|
|
destroy_surface(struct wl_resource *resource) |
|
|
|
destroy_surface(struct wl_resource *resource) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct weston_surface *surface = |
|
|
|
struct weston_surface *surface = |
|
|
|
container_of(resource, |
|
|
|
container_of(resource, |
|
|
|
struct weston_surface, surface.resource); |
|
|
|
struct weston_surface, surface.resource); |
|
|
@ -693,14 +691,10 @@ destroy_surface(struct wl_resource *resource) |
|
|
|
if (weston_surface_is_mapped(surface)) |
|
|
|
if (weston_surface_is_mapped(surface)) |
|
|
|
weston_surface_unmap(surface); |
|
|
|
weston_surface_unmap(surface); |
|
|
|
|
|
|
|
|
|
|
|
glDeleteTextures(surface->num_textures, surface->textures); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (surface->buffer) |
|
|
|
if (surface->buffer) |
|
|
|
wl_list_remove(&surface->buffer_destroy_listener.link); |
|
|
|
wl_list_remove(&surface->buffer_destroy_listener.link); |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < surface->num_images; i++) |
|
|
|
compositor->renderer->destroy_surface(surface); |
|
|
|
compositor->destroy_image(compositor->egl_display, |
|
|
|
|
|
|
|
surface->images[i]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pixman_region32_fini(&surface->transform.boundingbox); |
|
|
|
pixman_region32_fini(&surface->transform.boundingbox); |
|
|
|
pixman_region32_fini(&surface->damage); |
|
|
|
pixman_region32_fini(&surface->damage); |
|
|
|