diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-08-30 12:22:49 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-08-30 14:11:47 -0500 |
commit | 388f8c41c88658ed8d2ae10bcec28a2b0d9a720e (patch) | |
tree | 6f6a905a523d2c1f0788a297055864f284c37e6c /src/modules | |
parent | f2756f92e8cb0c8dd3e4861ff4914bdfa626823f (diff) | |
download | efl-388f8c41c88658ed8d2ae10bcec28a2b0d9a720e.tar.gz |
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.
Diffstat (limited to 'src/modules')
6 files changed, 14 insertions, 13 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index fe45f8a0d4..6c806765f1 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -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; diff --git a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h index 7be7e2e9c9..c2c0b53b35 100644 --- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h +++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h @@ -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; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index c640f6ccd0..4455aebebf 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -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; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.h b/src/modules/evas/engines/wayland_egl/evas_engine.h index 49218a9121..bab7cad7c9 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.h +++ b/src/modules/evas/engines/wayland_egl/evas_engine.h @@ -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; diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index a865502e97..b0249961ca 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -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()); diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index ce408210c1..e06b11e3d7 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -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; |