diff --git a/src/compositor.c b/src/compositor.c index 32505590..11756d7a 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -195,7 +195,6 @@ weston_surface_create(struct weston_compositor *compositor, surface->visual = WESTON_NONE_VISUAL; surface->shader = &compositor->texture_shader; surface->image = EGL_NO_IMAGE_KHR; - surface->saved_texture = 0; surface->x = x; surface->y = y; surface->width = width; @@ -367,10 +366,7 @@ destroy_surface(struct wl_resource *resource) wl_list_remove(&surface->link); weston_compositor_repick(compositor); - if (surface->saved_texture == 0) - glDeleteTextures(1, &surface->texture); - else - glDeleteTextures(1, &surface->saved_texture); + glDeleteTextures(1, &surface->texture); if (surface->buffer) wl_list_remove(&surface->buffer_destroy_listener.link); @@ -394,9 +390,6 @@ weston_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface) struct weston_compositor *ec = es->compositor; struct wl_list *surfaces_attached_to; - if (es->saved_texture != 0) - es->texture = es->saved_texture; - glBindTexture(GL_TEXTURE_2D, es->texture); if (wl_buffer_is_shm(buffer)) { diff --git a/src/compositor.h b/src/compositor.h index b995b13a..e318d7bd 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -226,7 +226,7 @@ enum weston_output_flags { struct weston_surface { struct wl_surface surface; struct weston_compositor *compositor; - GLuint texture, saved_texture; + GLuint texture; pixman_region32_t damage; pixman_region32_t opaque; int32_t x, y, width, height;