forked from enlightenment/efl
wayland: Store Ecore_Wl2_Display instead of wl_display in engines
We'll need to call ecore_wl2 functions on it soon, and anything that really needs the wl_display can query it.
This commit is contained in:
parent
f2756f92e8
commit
388f8c41c8
|
@ -187,7 +187,7 @@ _ee_display_unset(Ecore_Evas *ee)
|
|||
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
|
||||
if (!einfo) return;
|
||||
|
||||
einfo->info.wl_display = NULL;
|
||||
einfo->info.wl2_display = NULL;
|
||||
einfo->info.wl2_win = NULL;
|
||||
|
||||
wdata = ee->engine.data;
|
||||
|
@ -2165,7 +2165,7 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
|
|||
|
||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
||||
{
|
||||
einfo->info.wl_display = ecore_wl2_display_get(wdata->display);
|
||||
einfo->info.wl2_display = wdata->display;
|
||||
einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(wdata->display);
|
||||
einfo->info.wl_shm = ecore_wl2_display_shm_get(wdata->display);
|
||||
einfo->info.compositor_version =
|
||||
|
@ -2468,7 +2468,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
|
|||
wdata->sync_done = EINA_TRUE;
|
||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
||||
{
|
||||
einfo->info.wl_display = ecore_wl2_display_get(ewd);
|
||||
einfo->info.wl2_display = ewd;
|
||||
einfo->info.destination_alpha = EINA_TRUE;
|
||||
einfo->info.rotation = ee->rotation;
|
||||
einfo->info.depth = 32;
|
||||
|
|
|
@ -17,7 +17,7 @@ struct _Evas_Engine_Info_Wayland
|
|||
/* the wayland shm object used to create new shm pool */
|
||||
struct wl_shm *wl_shm;
|
||||
struct zwp_linux_dmabuf_v1 *wl_dmabuf;
|
||||
struct wl_display *wl_display;
|
||||
Ecore_Wl2_Display *wl2_display;
|
||||
Ecore_Wl2_Window *wl2_win;
|
||||
int depth, rotation, edges;
|
||||
int compositor_version;
|
||||
|
|
|
@ -659,7 +659,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int
|
|||
if (ob)
|
||||
{
|
||||
ob->info = inf;
|
||||
if ((ob->info->info.wl_display != ob->disp) ||
|
||||
if ((ob->info->info.wl2_display != ob->wl2_disp) ||
|
||||
(ob->info->info.wl2_win != ob->wl2_win) ||
|
||||
/* FIXME: comment out below line.
|
||||
* since there is no place set the info->info.win for now,
|
||||
|
@ -672,7 +672,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int
|
|||
Render_Output_Swap_Mode swap_mode = MODE_AUTO;
|
||||
|
||||
gl_wins--;
|
||||
if (!ob->info->info.wl_display)
|
||||
if (!ob->info->info.wl2_display)
|
||||
{
|
||||
eng_window_free(ob);
|
||||
re->generic.software.ob = NULL;
|
||||
|
|
|
@ -55,7 +55,7 @@ extern int _evas_engine_wl_egl_log_dom;
|
|||
|
||||
struct _Outbuf
|
||||
{
|
||||
struct wl_display *disp;
|
||||
Ecore_Wl2_Display *wl2_disp;
|
||||
struct wl_egl_window *win;
|
||||
Ecore_Wl2_Window *wl2_win;
|
||||
int w, h;
|
||||
|
|
|
@ -18,6 +18,7 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
|
|||
int num_config, n = 0;
|
||||
const GLubyte *vendor, *renderer, *version;
|
||||
Eina_Bool blacklist = EINA_FALSE;
|
||||
struct wl_display *wl_disp;
|
||||
|
||||
/* try to allocate space for our window */
|
||||
if (!(gw = calloc(1, sizeof(Outbuf))))
|
||||
|
@ -28,11 +29,11 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
|
|||
gw->w = w;
|
||||
gw->h = h;
|
||||
gw->swap_mode = swap_mode;
|
||||
gw->disp = einfo->info.wl_display;
|
||||
gw->wl2_disp = einfo->info.wl2_display;
|
||||
gw->wl2_win = einfo->info.wl2_win;
|
||||
if (display && (display != gw->disp))
|
||||
if (display && (display != ecore_wl2_display_get(gw->wl2_disp)))
|
||||
context = EGL_NO_CONTEXT;
|
||||
display = gw->disp;
|
||||
display = ecore_wl2_display_get(gw->wl2_disp);
|
||||
gw->depth = einfo->info.depth;
|
||||
gw->alpha = einfo->info.destination_alpha;
|
||||
gw->rot = einfo->info.rotation;
|
||||
|
@ -71,8 +72,8 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
|
|||
*/
|
||||
|
||||
setenv("EGL_PLATFORM", "wayland", 1);
|
||||
|
||||
gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)gw->disp);
|
||||
wl_disp = ecore_wl2_display_get(gw->wl2_disp);
|
||||
gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)wl_disp);
|
||||
if (!gw->egl_disp)
|
||||
{
|
||||
ERR("eglGetDisplay() fail. code=%#x", eglGetError());
|
||||
|
|
|
@ -790,7 +790,7 @@ _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff)
|
|||
surf = s->surf.dmabuf;
|
||||
|
||||
surf->surface = s;
|
||||
surf->wl_display = s->info->info.wl_display;
|
||||
surf->wl_display = ecore_wl2_display_get(s->info->info.wl2_display);
|
||||
surf->dmabuf = s->info->info.wl_dmabuf;
|
||||
surf->alpha = s->info->info.destination_alpha;
|
||||
surf->compositor_version = s->info->info.compositor_version;
|
||||
|
|
Loading…
Reference in New Issue