forked from enlightenment/efl
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.
This commit is contained in:
parent
73d1ab0cd5
commit
15fdbca653
|
@ -187,7 +187,6 @@ _ee_display_unset(Ecore_Evas *ee)
|
|||
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
|
||||
if (!einfo) return;
|
||||
|
||||
einfo->info.wl2_display = NULL;
|
||||
einfo->info.wl2_win = NULL;
|
||||
|
||||
wdata = ee->engine.data;
|
||||
|
@ -2210,7 +2209,6 @@ _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.wl2_display = wdata->display;
|
||||
einfo->info.destination_alpha = EINA_TRUE;
|
||||
einfo->info.rotation = ee->rotation;
|
||||
einfo->info.wl2_win = wdata->win;
|
||||
|
@ -2511,7 +2509,6 @@ _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.wl2_display = ewd;
|
||||
einfo->info.destination_alpha = EINA_TRUE;
|
||||
einfo->info.rotation = ee->rotation;
|
||||
einfo->info.depth = 32;
|
||||
|
|
|
@ -14,7 +14,6 @@ struct _Evas_Engine_Info_Wayland
|
|||
/* engine specific data & parameters it needs to set up */
|
||||
struct
|
||||
{
|
||||
Ecore_Wl2_Display *wl2_display;
|
||||
Ecore_Wl2_Window *wl2_win;
|
||||
int depth, rotation, edges;
|
||||
Eina_Bool destination_alpha : 1;
|
||||
|
|
|
@ -658,8 +658,10 @@ eng_output_update(void *engine EINA_UNUSED, void *data, void *info, unsigned int
|
|||
|
||||
if (ob)
|
||||
{
|
||||
Ecore_Wl2_Display *ewd;
|
||||
ob->info = inf;
|
||||
if ((ob->info->info.wl2_display != ob->wl2_disp) ||
|
||||
ewd = ecore_wl2_window_display_get(ob->info->info.wl2_win);
|
||||
if ((ewd != 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 +674,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.wl2_display)
|
||||
if (!ewd)
|
||||
{
|
||||
eng_window_free(ob);
|
||||
re->generic.software.ob = NULL;
|
||||
|
|
|
@ -29,7 +29,7 @@ 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->wl2_disp = einfo->info.wl2_display;
|
||||
gw->wl2_disp = ecore_wl2_window_display_get(einfo->info.wl2_win);
|
||||
gw->wl2_win = einfo->info.wl2_win;
|
||||
if (display && (display != ecore_wl2_display_get(gw->wl2_disp)))
|
||||
context = EGL_NO_CONTEXT;
|
||||
|
|
|
@ -178,7 +178,7 @@ _evas_surface_create(Evas_Engine_Info_Wayland *info, Outbuf *ob)
|
|||
out->info = info;
|
||||
out->ob = ob;
|
||||
|
||||
ewd = info->info.wl2_display;
|
||||
ewd = ecore_wl2_window_display_get(info->info.wl2_win);
|
||||
if (ecore_wl2_display_shm_get(ewd))
|
||||
types |= ECORE_WL2_BUFFER_SHM;
|
||||
if (ecore_wl2_display_dmabuf_get(ewd))
|
||||
|
|
|
@ -130,14 +130,16 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned
|
|||
{
|
||||
Evas_Engine_Info_Wayland *einfo = info;
|
||||
Render_Engine *re = data;
|
||||
Ecore_Wl2_Display *ewd;
|
||||
Outbuf *ob;
|
||||
|
||||
ob = re->generic.ob;
|
||||
if (ob->ewd != einfo->info.wl2_display)
|
||||
ewd = ecore_wl2_window_display_get(einfo->info.wl2_win);
|
||||
if (ob->ewd != ewd)
|
||||
{
|
||||
if (einfo->info.wl2_display)
|
||||
if (ewd)
|
||||
ob->dirty = EINA_TRUE;
|
||||
re->generic.ob->ewd = einfo->info.wl2_display;
|
||||
re->generic.ob->ewd = ewd;
|
||||
}
|
||||
|
||||
eng_output_resize(engine, data, w, h);
|
||||
|
|
|
@ -26,7 +26,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info)
|
|||
ob->rotation = info->info.rotation;
|
||||
ob->depth = info->info.depth;
|
||||
ob->priv.destination_alpha = info->info.destination_alpha;
|
||||
ob->ewd = info->info.wl2_display;
|
||||
ob->ewd = ecore_wl2_window_display_get(info->info.wl2_win);
|
||||
|
||||
ob->surface = _evas_surface_create(info, ob);
|
||||
if (!ob->surface) goto surf_err;
|
||||
|
|
Loading…
Reference in New Issue