mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Fix EGLImageKHR leak in wl_buffer destroy
This commit is contained in:
parent
45115a435e
commit
98ffc93b95
2 changed files with 4 additions and 5 deletions
|
|
@ -121,6 +121,7 @@ struct wlsc_drm {
|
||||||
|
|
||||||
struct wlsc_buffer {
|
struct wlsc_buffer {
|
||||||
struct wl_buffer base;
|
struct wl_buffer base;
|
||||||
|
struct wlsc_compositor *compositor;
|
||||||
int32_t width, height;
|
int32_t width, height;
|
||||||
EGLImageKHR image;
|
EGLImageKHR image;
|
||||||
struct wl_visual *visual;
|
struct wl_visual *visual;
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,9 @@ destroy_buffer(struct wl_resource *resource, struct wl_client *client)
|
||||||
{
|
{
|
||||||
struct wlsc_buffer *buffer =
|
struct wlsc_buffer *buffer =
|
||||||
container_of(resource, struct wlsc_buffer, base.base);
|
container_of(resource, struct wlsc_buffer, base.base);
|
||||||
|
struct wlsc_compositor *compositor = buffer->compositor;
|
||||||
|
|
||||||
#if 0
|
eglDestroyImageKHR(compositor->display, buffer->image);
|
||||||
/* FIXME: Need backlink to EGL display here */
|
|
||||||
eglDestroyImageKHR(ec->display, buffer->image);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,6 +98,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
|
||||||
attribs[3] = height;
|
attribs[3] = height;
|
||||||
attribs[5] = stride / 4;
|
attribs[5] = stride / 4;
|
||||||
|
|
||||||
|
buffer->compositor = compositor;
|
||||||
buffer->width = width;
|
buffer->width = width;
|
||||||
buffer->height = height;
|
buffer->height = height;
|
||||||
buffer->visual = visual;
|
buffer->visual = visual;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue