diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-11-14 15:45:39 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-11-15 11:54:37 -0600 |
commit | 04cebba6231e737457a36a81c643439c43571724 (patch) | |
tree | 2fef3655607211ce6fc44965f10b0c45df6ae19b /src/lib/ecore_wl2/ecore_wl2_buffer.c | |
parent | 579b6d69b305a89657d06760c5374e4d61159e93 (diff) |
ecore_wl2: Filter buffer types by compositor capabilities
It does us no good to be able to allocate dmabuf capable memory if the
compositor can't handle it. This should fix failures on systems where
allocation is possible but the compositor doesn't advertise dmabuf.
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_buffer.c')
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c index 32e779ed00..6fd725240c 100644 --- a/src/lib/ecore_wl2/ecore_wl2_buffer.c +++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c | |||
@@ -398,11 +398,11 @@ _wl_shm_buffer_manager_setup(int fd EINA_UNUSED) | |||
398 | } | 398 | } |
399 | 399 | ||
400 | EAPI Eina_Bool | 400 | EAPI Eina_Bool |
401 | ecore_wl2_buffer_init(Ecore_Wl2_Buffer_Type types) | 401 | ecore_wl2_buffer_init(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer_Type types) |
402 | { | 402 | { |
403 | int fd; | 403 | int fd; |
404 | Eina_Bool dmabuf = types & ECORE_WL2_BUFFER_DMABUF; | 404 | Eina_Bool dmabuf = ewd->wl.dmabuf && (types & ECORE_WL2_BUFFER_DMABUF); |
405 | Eina_Bool shm = types & ECORE_WL2_BUFFER_SHM; | 405 | Eina_Bool shm = ewd->wl.shm && (types & ECORE_WL2_BUFFER_SHM); |
406 | Eina_Bool success = EINA_FALSE; | 406 | Eina_Bool success = EINA_FALSE; |
407 | 407 | ||
408 | if (buffer_manager) | 408 | if (buffer_manager) |