wayland_shm: Handle dirty bit outside of the backends

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.
This commit is contained in:
Derek Foreman 2017-09-11 15:48:56 -05:00
parent 2a15d7b730
commit 7faa20f3c8
2 changed files with 3 additions and 2 deletions

View 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,

View 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);
}