wayland_shm: Handle dirty bit outside of the backends
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 11 Sep 2017 20:48:56 +0000 (15:48 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Thu, 12 Oct 2017 17:24:03 +0000 (12:24 -0500)
We don't have to query that deeply to know whether we need to redraw the
buffer or not, we can make that decision in more generic code.

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

index 21ed483..786ddb4 100644 (file)
@@ -136,6 +136,8 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned
    ob = re->generic.ob;
    if (ob->ewd != einfo->info.wl2_display)
      {
+        if (einfo->info.wl2_display)
+          ob->dirty = EINA_TRUE;
         re->generic.ob->ewd = einfo->info.wl2_display;
      }
    _evas_outbuf_surface_set(ob,
index 99486b7..9caa529 100644 (file)
@@ -653,6 +653,5 @@ _evas_outbuf_redraws_clear(Outbuf *ob)
 void
 _evas_outbuf_surface_set(Outbuf *ob, struct wl_shm *wl_shm, struct zwp_linux_dmabuf_v1 *wl_dmabuf)
 {
-   if (ob->surface->funcs.surface_set(ob->surface, wl_shm, wl_dmabuf))
-     ob->dirty = EINA_TRUE;
+   ob->surface->funcs.surface_set(ob->surface, wl_shm, wl_dmabuf);
 }