diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-11-16 13:16:19 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-11-16 13:18:48 -0600 |
commit | 925be86f9e4093aa3fc5d27819951dc55c3faa04 (patch) | |
tree | b63bfa10a592b98e0d02e156921ec9359469ec6b /src/lib/ecore_wl2/ecore_wl2_buffer.c | |
parent | c08920820b386b48b57df6eac3dbacdfb37c1bd7 (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.c | 5 |
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... | ||
460 | static void | 459 | static 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 | ||
469 | static Buffer_Handle * | 467 | static 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; |
616 | fail: | 616 | fail: |
617 | _buffer_manager_destroy(); | ||
617 | ewd->wl.dmabuf = NULL; | 618 | ewd->wl.dmabuf = NULL; |
618 | } | 619 | } |