egl/wayland: do not leak wl_buffer when it is locked
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 30 Aug 2018 08:14:49 +0000 (10:14 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Fri, 31 Aug 2018 14:29:36 +0000 (16:29 +0200)
commit54a9622dd5fdee7d18c05d968c97c4dd4fa9c83c
treeab0222a3b8b1f331b238b3c26ee0d0b531281b5f
parent2c1f249f2b61be50222411bc0d41c095004232ed
egl/wayland: do not leak wl_buffer when it is locked

If color buffer is locked, do not set its wayland buffer to NULL;
otherwise it can not be freed later.

Rather, flag it in order to destroy it later on the release event.

v2: instruct release event to unlock only or free wl_buffer too (Daniel)

This also fixes dEQP-EGL.functional.swap_buffers_with_damage.* tests.

CC: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_wayland.c