projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a3cd28
)
compositor: Destroy EGLImage and texture when a NULL buffer is attached
author
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 19 Jun 2012 19:41:12 +0000
(15:41 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 19 Jun 2012 19:52:01 +0000
(15:52 -0400)
src/compositor.c
patch
|
blob
|
history
diff --git
a/src/compositor.c
b/src/compositor.c
index
73fed3e
..
00b8f3e
100644
(file)
--- a/
src/compositor.c
+++ b/
src/compositor.c
@@
-711,6
+711,14
@@
weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
if (!buffer) {
if (weston_surface_is_mapped(es))
weston_surface_unmap(es);
+ if (es->image != EGL_NO_IMAGE_KHR) {
+ ec->destroy_image(ec->egl_display, es->image);
+ es->image = NULL;
+ }
+ if (es->texture) {
+ glDeleteTextures(1, &es->texture);
+ es->texture = 0;
+ }
return;
}