summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-11-29 14:52:43 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-12-01 10:58:44 -0600
commit15fdbca653c839058b0cca63fca61d2bb7a81f70 (patch)
tree305de862450b63c26042cd478c07976bffc056d5
parent73d1ab0cd5ab2cc760a5d7ba7fc07df4a7fde1d4 (diff)
wayland evas: Remove Ecore_Wl2_Display from engine info
We've got the Ecore_Wl2_Window so we can always get the display from that.
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c3
-rw-r--r--src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h1
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c6
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c8
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c2
7 files changed, 12 insertions, 12 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 e43469b..19163cb 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,6 @@ _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.wl2_display = NULL;
191 einfo->info.wl2_win = NULL; 190 einfo->info.wl2_win = NULL;
192 191
193 wdata = ee->engine.data; 192 wdata = ee->engine.data;
@@ -2210,7 +2209,6 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
2210 2209
2211 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) 2210 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
2212 { 2211 {
2213 einfo->info.wl2_display = wdata->display;
2214 einfo->info.destination_alpha = EINA_TRUE; 2212 einfo->info.destination_alpha = EINA_TRUE;
2215 einfo->info.rotation = ee->rotation; 2213 einfo->info.rotation = ee->rotation;
2216 einfo->info.wl2_win = wdata->win; 2214 einfo->info.wl2_win = wdata->win;
@@ -2511,7 +2509,6 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
2511 wdata->sync_done = EINA_TRUE; 2509 wdata->sync_done = EINA_TRUE;
2512 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas))) 2510 if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
2513 { 2511 {
2514 einfo->info.wl2_display = ewd;
2515 einfo->info.destination_alpha = EINA_TRUE; 2512 einfo->info.destination_alpha = EINA_TRUE;
2516 einfo->info.rotation = ee->rotation; 2513 einfo->info.rotation = ee->rotation;
2517 einfo->info.depth = 32; 2514 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 4961132..e733825 100644
--- a/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h
+++ b/src/modules/evas/engines/wayland_common/Evas_Engine_Wayland.h
@@ -14,7 +14,6 @@ struct _Evas_Engine_Info_Wayland
14 /* engine specific data & parameters it needs to set up */ 14 /* engine specific data & parameters it needs to set up */
15 struct 15 struct
16 { 16 {
17 Ecore_Wl2_Display *wl2_display;
18 Ecore_Wl2_Window *wl2_win; 17 Ecore_Wl2_Window *wl2_win;
19 int depth, rotation, edges; 18 int depth, rotation, edges;
20 Eina_Bool destination_alpha : 1; 19 Eina_Bool destination_alpha : 1;
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 560f54c..4f22f8a 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -658,8 +658,10 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int
658 658
659 if (ob) 659 if (ob)
660 { 660 {
661 Ecore_Wl2_Display *ewd;
661 ob->info = inf; 662 ob->info = inf;
662 if ((ob->info->info.wl2_display != ob->wl2_disp) || 663 ewd = ecore_wl2_window_display_get(ob->info->info.wl2_win);
664 if ((ewd != ob->wl2_disp) ||
663 (ob->info->info.wl2_win != ob->wl2_win) || 665 (ob->info->info.wl2_win != ob->wl2_win) ||
664 /* FIXME: comment out below line. 666 /* FIXME: comment out below line.
665 * since there is no place set the info->info.win for now, 667 * since there is no place set the info->info.win for now,
@@ -672,7 +674,7 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int
672 Render_Output_Swap_Mode swap_mode = MODE_AUTO; 674 Render_Output_Swap_Mode swap_mode = MODE_AUTO;
673 675
674 gl_wins--; 676 gl_wins--;
675 if (!ob->info->info.wl2_display) 677 if (!ewd)
676 { 678 {
677 eng_window_free(ob); 679 eng_window_free(ob);
678 re->generic.software.ob = NULL; 680 re->generic.software.ob = NULL;
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 aed592b..7b916cc 100644
--- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c
+++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
@@ -29,7 +29,7 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
29 gw->w = w; 29 gw->w = w;
30 gw->h = h; 30 gw->h = h;
31 gw->swap_mode = swap_mode; 31 gw->swap_mode = swap_mode;
32 gw->wl2_disp = einfo->info.wl2_display; 32 gw->wl2_disp = ecore_wl2_window_display_get(einfo->info.wl2_win);
33 gw->wl2_win = einfo->info.wl2_win; 33 gw->wl2_win = einfo->info.wl2_win;
34 if (display && (display != ecore_wl2_display_get(gw->wl2_disp))) 34 if (display && (display != ecore_wl2_display_get(gw->wl2_disp)))
35 context = EGL_NO_CONTEXT; 35 context = EGL_NO_CONTEXT;
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 53a5a79..46cea14 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -178,7 +178,7 @@ _evas_surface_create(Evas_Engine_Info_Wayland *info, Outbuf *ob)
178 out->info = info; 178 out->info = info;
179 out->ob = ob; 179 out->ob = ob;
180 180
181 ewd = info->info.wl2_display; 181 ewd = ecore_wl2_window_display_get(info->info.wl2_win);
182 if (ecore_wl2_display_shm_get(ewd)) 182 if (ecore_wl2_display_shm_get(ewd))
183 types |= ECORE_WL2_BUFFER_SHM; 183 types |= ECORE_WL2_BUFFER_SHM;
184 if (ecore_wl2_display_dmabuf_get(ewd)) 184 if (ecore_wl2_display_dmabuf_get(ewd))
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index df6d68c..d587aba 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -130,14 +130,16 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned
130{ 130{
131 Evas_Engine_Info_Wayland *einfo = info; 131 Evas_Engine_Info_Wayland *einfo = info;
132 Render_Engine *re = data; 132 Render_Engine *re = data;
133 Ecore_Wl2_Display *ewd;
133 Outbuf *ob; 134 Outbuf *ob;
134 135
135 ob = re->generic.ob; 136 ob = re->generic.ob;
136 if (ob->ewd != einfo->info.wl2_display) 137 ewd = ecore_wl2_window_display_get(einfo->info.wl2_win);
138 if (ob->ewd != ewd)
137 { 139 {
138 if (einfo->info.wl2_display) 140 if (ewd)
139 ob->dirty = EINA_TRUE; 141 ob->dirty = EINA_TRUE;
140 re->generic.ob->ewd = einfo->info.wl2_display; 142 re->generic.ob->ewd = ewd;
141 } 143 }
142 144
143 eng_output_resize(engine, data, w, h); 145 eng_output_resize(engine, data, w, h);
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index ddc24af..ad80a49 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -26,7 +26,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info)
26 ob->rotation = info->info.rotation; 26 ob->rotation = info->info.rotation;
27 ob->depth = info->info.depth; 27 ob->depth = info->info.depth;
28 ob->priv.destination_alpha = info->info.destination_alpha; 28 ob->priv.destination_alpha = info->info.destination_alpha;
29 ob->ewd = info->info.wl2_display; 29 ob->ewd = ecore_wl2_window_display_get(info->info.wl2_win);
30 30
31 ob->surface = _evas_surface_create(info, ob); 31 ob->surface = _evas_surface_create(info, ob);
32 if (!ob->surface) goto surf_err; 32 if (!ob->surface) goto surf_err;