summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-30 12:22:49 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-30 14:11:47 -0500
commit388f8c41c88658ed8d2ae10bcec28a2b0d9a720e (patch)
tree6f6a905a523d2c1f0788a297055864f284c37e6c /src/modules
parentf2756f92e8cb0c8dd3e4861ff4914bdfa626823f (diff)
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')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c6
-rw-r--r--src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h2
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c4
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c11
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c2
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 fe45f8a..6c80676 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)
187 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas); 187 einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
188 if (!einfo) return; 188 if (!einfo) return;
189 189
190 einfo->info.wl_display = NULL; 190 einfo->info.wl2_display = NULL;
191 einfo->info.wl2_win = NULL; 191 einfo->info.wl2_win = NULL;
192 192
193 wdata = ee->engine.data; 193 wdata = ee->engine.data;
@@ -2165,7 +2165,7 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
2165 2165
2166 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) 2166 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
2167 { 2167 {
2168 einfo->info.wl_display = ecore_wl2_display_get(wdata->display); 2168 einfo->info.wl2_display = wdata->display;
2169 einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(wdata->display); 2169 einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(wdata->display);
2170 einfo->info.wl_shm = ecore_wl2_display_shm_get(wdata->display); 2170 einfo->info.wl_shm = ecore_wl2_display_shm_get(wdata->display);
2171 einfo->info.compositor_version = 2171 einfo->info.compositor_version =
@@ -2468,7 +2468,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2468 wdata->sync_done = EINA_TRUE; 2468 wdata->sync_done = EINA_TRUE;
2469 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) 2469 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
2470 { 2470 {
2471 einfo->info.wl_display = ecore_wl2_display_get(ewd); 2471 einfo->info.wl2_display = ewd;
2472 einfo->info.destination_alpha = EINA_TRUE; 2472 einfo->info.destination_alpha = EINA_TRUE;
2473 einfo->info.rotation = ee->rotation; 2473 einfo->info.rotation = ee->rotation;
2474 einfo->info.depth = 32; 2474 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 7be7e2e..c2c0b53 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
17 /* the wayland shm object used to create new shm pool */ 17 /* the wayland shm object used to create new shm pool */
18 struct wl_shm *wl_shm; 18 struct wl_shm *wl_shm;
19 struct zwp_linux_dmabuf_v1 *wl_dmabuf; 19 struct zwp_linux_dmabuf_v1 *wl_dmabuf;
20 struct wl_display *wl_display; 20 Ecore_Wl2_Display *wl2_display;
21 Ecore_Wl2_Window *wl2_win; 21 Ecore_Wl2_Window *wl2_win;
22 int depth, rotation, edges; 22 int depth, rotation, edges;
23 int compositor_version; 23 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 c640f6c..4455aeb 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
659 if (ob) 659 if (ob)
660 { 660 {
661 ob->info = inf; 661 ob->info = inf;
662 if ((ob->info->info.wl_display != ob->disp) || 662 if ((ob->info->info.wl2_display != ob->wl2_disp) ||
663 (ob->info->info.wl2_win != ob->wl2_win) || 663 (ob->info->info.wl2_win != ob->wl2_win) ||
664 /* FIXME: comment out below line. 664 /* FIXME: comment out below line.
665 * since there is no place set the info->info.win for now, 665 * 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
672 Render_Output_Swap_Mode swap_mode = MODE_AUTO; 672 Render_Output_Swap_Mode swap_mode = MODE_AUTO;
673 673
674 gl_wins--; 674 gl_wins--;
675 if (!ob->info->info.wl_display) 675 if (!ob->info->info.wl2_display)
676 { 676 {
677 eng_window_free(ob); 677 eng_window_free(ob);
678 re->generic.software.ob = NULL; 678 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 49218a9..bab7cad 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;
55 55
56struct _Outbuf 56struct _Outbuf
57{ 57{
58 struct wl_display *disp; 58 Ecore_Wl2_Display *wl2_disp;
59 struct wl_egl_window *win; 59 struct wl_egl_window *win;
60 Ecore_Wl2_Window *wl2_win; 60 Ecore_Wl2_Window *wl2_win;
61 int w, h; 61 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 a865502..b024996 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
18 int num_config, n = 0; 18 int num_config, n = 0;
19 const GLubyte *vendor, *renderer, *version; 19 const GLubyte *vendor, *renderer, *version;
20 Eina_Bool blacklist = EINA_FALSE; 20 Eina_Bool blacklist = EINA_FALSE;
21 struct wl_display *wl_disp;
21 22
22 /* try to allocate space for our window */ 23 /* try to allocate space for our window */
23 if (!(gw = calloc(1, sizeof(Outbuf)))) 24 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
28 gw->w = w; 29 gw->w = w;
29 gw->h = h; 30 gw->h = h;
30 gw->swap_mode = swap_mode; 31 gw->swap_mode = swap_mode;
31 gw->disp = einfo->info.wl_display; 32 gw->wl2_disp = einfo->info.wl2_display;
32 gw->wl2_win = einfo->info.wl2_win; 33 gw->wl2_win = einfo->info.wl2_win;
33 if (display && (display != gw->disp)) 34 if (display && (display != ecore_wl2_display_get(gw->wl2_disp)))
34 context = EGL_NO_CONTEXT; 35 context = EGL_NO_CONTEXT;
35 display = gw->disp; 36 display = ecore_wl2_display_get(gw->wl2_disp);
36 gw->depth = einfo->info.depth; 37 gw->depth = einfo->info.depth;
37 gw->alpha = einfo->info.destination_alpha; 38 gw->alpha = einfo->info.destination_alpha;
38 gw->rot = einfo->info.rotation; 39 gw->rot = einfo->info.rotation;
@@ -71,8 +72,8 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
71 */ 72 */
72 73
73 setenv("EGL_PLATFORM", "wayland", 1); 74 setenv("EGL_PLATFORM", "wayland", 1);
74 75 wl_disp = ecore_wl2_display_get(gw->wl2_disp);
75 gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)gw->disp); 76 gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)wl_disp);
76 if (!gw->egl_disp) 77 if (!gw->egl_disp)
77 { 78 {
78 ERR("eglGetDisplay() fail. code=%#x", eglGetError()); 79 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 ce40821..e06b11e 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)
790 surf = s->surf.dmabuf; 790 surf = s->surf.dmabuf;
791 791
792 surf->surface = s; 792 surf->surface = s;
793 surf->wl_display = s->info->info.wl_display; 793 surf->wl_display = ecore_wl2_display_get(s->info->info.wl2_display);
794 surf->dmabuf = s->info->info.wl_dmabuf; 794 surf->dmabuf = s->info->info.wl_dmabuf;
795 surf->alpha = s->info->info.destination_alpha; 795 surf->alpha = s->info->info.destination_alpha;
796 surf->compositor_version = s->info->info.compositor_version; 796 surf->compositor_version = s->info->info.compositor_version;