forked from enlightenment/efl
wayland_shm: Fix dmabuf failed allocation handling
We frequently attempt to generate multiple buffers before any come back as failed - the orphaned buffers need to be handled more carefully.
This commit is contained in:
parent
5d5c04fd66
commit
dfd9159a53
|
@ -197,12 +197,14 @@ static void
|
||||||
_create_failed(void *data, struct zwp_linux_buffer_params_v1 *params)
|
_create_failed(void *data, struct zwp_linux_buffer_params_v1 *params)
|
||||||
{
|
{
|
||||||
Dmabuf_Buffer *b = data;
|
Dmabuf_Buffer *b = data;
|
||||||
|
Eina_Bool orphaned;
|
||||||
|
|
||||||
zwp_linux_buffer_params_v1_destroy(params);
|
zwp_linux_buffer_params_v1_destroy(params);
|
||||||
|
|
||||||
dmabuf_totally_hosed = EINA_TRUE;
|
dmabuf_totally_hosed = EINA_TRUE;
|
||||||
_evas_dmabuf_buffer_destroy(b);
|
orphaned = b->orphaned;
|
||||||
_allocation_complete(b);
|
_allocation_complete(b);
|
||||||
|
if (orphaned) _evas_dmabuf_buffer_destroy(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct zwp_linux_buffer_params_v1_listener params_listener =
|
static const struct zwp_linux_buffer_params_v1_listener params_listener =
|
||||||
|
|
Loading…
Reference in New Issue