From: Changyeon Lee Date: Tue, 22 Mar 2016 10:16:47 +0000 (+0900) Subject: wl_tbm:bind wl display to bufmgr X-Git-Tag: accepted/tizen/mobile/20160324.011646~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc15ea3aa5e296095dcadd3adad4a6e3082b00dd;p=platform%2Fupstream%2Fenlightenment.git wl_tbm:bind wl display to bufmgr Change-Id: I039a24cfd897723a0c0c8aa646c1764918bf9e40 --- diff --git a/src/bin/e_comp_wl_tbm.c b/src/bin/e_comp_wl_tbm.c index 94e13c5c03..fb2bd88f5c 100644 --- a/src/bin/e_comp_wl_tbm.c +++ b/src/bin/e_comp_wl_tbm.c @@ -2,6 +2,24 @@ #include "e.h" #include #include +#include + +static int +_e_comp_wl_tbm_bind_wl_display(struct wayland_tbm_server *tbm_server, struct wl_display *display) +{ + tbm_bufmgr bufmgr = NULL; + + bufmgr = wayland_tbm_server_get_bufmgr(tbm_server); + EINA_SAFETY_ON_FALSE_RETURN_VAL(bufmgr, EINA_FALSE); + + if (!tbm_bufmgr_bind_native_display(bufmgr, (void *)display)) + { + e_error_message_show(_("Enlightenment cannot bind native Display TBM!\n")); + return EINA_FALSE; + } + + return EINA_TRUE; +} EINTERN Eina_Bool e_comp_wl_tbm_init(void) @@ -44,6 +62,8 @@ e_comp_wl_tbm_init(void) e_comp->wl_comp_data->tbm.server = (void *)tbm_server; + _e_comp_wl_tbm_bind_wl_display(tbm_server, e_comp->wl_comp_data->wl.disp); + return EINA_TRUE; } @@ -64,4 +84,3 @@ e_comp_wl_tbm_shutdown(void) e_comp->wl_comp_data->tbm.server = NULL; } -