summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_buffer.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-11-16 13:16:19 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-11-16 13:18:48 -0600
commit925be86f9e4093aa3fc5d27819951dc55c3faa04 (patch)
treeb63bfa10a592b98e0d02e156921ec9359469ec6b /src/lib/ecore_wl2/ecore_wl2_buffer.c
parentc08920820b386b48b57df6eac3dbacdfb37c1bd7 (diff)
ecore_wl2: Fix dmabuf test failure
We need to destroy the buffer manager on fail, since it will exist but only be able to create buffers we can't actually use.
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_buffer.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c
index 9363c1be9c..08a6df007a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_buffer.c
+++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c
@@ -456,7 +456,6 @@ _buffer_manager_deref(void)
456 if (drm_fd >=0) close(drm_fd); 456 if (drm_fd >=0) close(drm_fd);
457} 457}
458 458
459/* Currently no callers, but that will change...
460static void 459static void
461_buffer_manager_destroy(void) 460_buffer_manager_destroy(void)
462{ 461{
@@ -464,7 +463,6 @@ _buffer_manager_destroy(void)
464 buffer_manager->destroyed = EINA_TRUE; 463 buffer_manager->destroyed = EINA_TRUE;
465 _buffer_manager_deref(); 464 _buffer_manager_deref();
466} 465}
467*/
468 466
469static Buffer_Handle * 467static Buffer_Handle *
470_buffer_manager_alloc(const char *name, int w, int h, unsigned long *stride, int32_t *fd) 468_buffer_manager_alloc(const char *name, int w, int h, unsigned long *stride, int32_t *fd)
@@ -585,6 +583,8 @@ _create_failed(void *data, struct zwp_linux_buffer_params_v1 *params)
585 Ecore_Wl2_Display *ewd = data; 583 Ecore_Wl2_Display *ewd = data;
586 584
587 zwp_linux_buffer_params_v1_destroy(params); 585 zwp_linux_buffer_params_v1_destroy(params);
586 _buffer_manager_deref();
587 _buffer_manager_destroy();
588 ewd->wl.dmabuf = NULL; 588 ewd->wl.dmabuf = NULL;
589} 589}
590 590
@@ -614,5 +614,6 @@ _ecore_wl2_buffer_test(Ecore_Wl2_Display *ewd)
614 614
615 return; 615 return;
616fail: 616fail:
617 _buffer_manager_destroy();
617 ewd->wl.dmabuf = NULL; 618 ewd->wl.dmabuf = NULL;
618} 619}