derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dfd9159a53ffb06e770c613e596b857cde52bd0b

commit dfd9159a53ffb06e770c613e596b857cde52bd0b
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu May 5 11:48:42 2016 -0500

    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.
---
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c 
b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index df16114..ee31a23 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -197,12 +197,14 @@ static void
 _create_failed(void *data, struct zwp_linux_buffer_params_v1 *params)
 {
    Dmabuf_Buffer *b = data;
+   Eina_Bool orphaned;
 
    zwp_linux_buffer_params_v1_destroy(params);
 
    dmabuf_totally_hosed = EINA_TRUE;
-   _evas_dmabuf_buffer_destroy(b);
+   orphaned = b->orphaned;
    _allocation_complete(b);
+   if (orphaned) _evas_dmabuf_buffer_destroy(b);
 }
 
 static const struct zwp_linux_buffer_params_v1_listener params_listener =

-- 


Reply via email to