wayland_shm: Store the ecore_wl2_display in the Outbuf
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 11 Sep 2017 20:37:53 +0000 (15:37 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Thu, 12 Oct 2017 17:24:03 +0000 (12:24 -0500)
We'll need it soon.

src/modules/evas/engines/wayland_shm/evas_engine.c
src/modules/evas/engines/wayland_shm/evas_engine.h
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index e74cc2f..21ed483 100644 (file)
@@ -131,8 +131,14 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned
 {
    Evas_Engine_Info_Wayland *einfo = info;
    Render_Engine *re = data;
+   Outbuf *ob;
 
-   _evas_outbuf_surface_set(re->generic.ob,
+   ob = re->generic.ob;
+   if (ob->ewd != einfo->info.wl2_display)
+     {
+        re->generic.ob->ewd = einfo->info.wl2_display;
+     }
+   _evas_outbuf_surface_set(ob,
                             einfo->info.wl_shm,
                             einfo->info.wl_dmabuf);
 
index 7cbedf0..2b014c3 100644 (file)
@@ -112,6 +112,7 @@ struct _Outbuf
    int num_buff;
    Outbuf_Depth depth;
 
+   Ecore_Wl2_Display *ewd;
    Evas_Engine_Info_Wayland *info;
 
    Surface *surface;
index 3281f60..99486b7 100644 (file)
@@ -56,6 +56,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info)
    ob->depth = info->info.depth;
    ob->priv.destination_alpha = info->info.destination_alpha;
    ob->hidden = info->info.hidden;
+   ob->ewd = info->info.wl2_display;
 
    /* default to triple buffer */
    ob->num_buff = 3;