derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=656d892581c64c8c2adf854a316fd542738e7070
commit 656d892581c64c8c2adf854a316fd542738e7070 Author: Derek Foreman <[email protected]> Date: Thu Sep 14 12:30:12 2017 -0500 wayland_shm: Remove hidden from surface posting calls Now that we tick based on frame callbacks it should be impossible to post an update while hidden. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 14 ++++++-------- src/modules/evas/engines/wayland_shm/evas_engine.h | 2 +- src/modules/evas/engines/wayland_shm/evas_outbuf.c | 2 +- src/modules/evas/engines/wayland_shm/evas_shm.c | 11 ++++------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index cdd01a42af..02e5c9cc6c 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -456,7 +456,7 @@ _fallback(Dmabuf_Surface *s, int w, int h) new_data = surf->funcs.data_get(surf, NULL, NULL); for (y = 0; y < h; y++) memcpy(new_data + y * w * 4, old_data + y * b->stride, w * 4); - surf->funcs.post(surf, NULL, 0, EINA_FALSE); + surf->funcs.post(surf, NULL, 0); _buffer_manager_unmap(b); b->mapping = NULL; @@ -679,7 +679,7 @@ _evas_dmabuf_surface_assign(Surface *s) } static void -_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) +_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count) { struct wl_surface *wls; Dmabuf_Surface *surface; @@ -711,12 +711,10 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, win = s->info->info.wl2_win; wls = ecore_wl2_window_surface_get(win); - if (!hidden) - { - ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE); - _evas_surface_damage(wls, surface->compositor_version, - b->w, b->h, rects, count); - } + + ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE); + _evas_surface_damage(wls, surface->compositor_version, + b->w, b->h, rects, count); ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); } diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index ca6a172ffe..d7302f47d0 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -100,7 +100,7 @@ struct _Surface void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags, Eina_Bool force); void *(*data_get)(Surface *surface, int *w, int *h); int (*assign)(Surface *surface); - void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden); + void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int count); } funcs; }; diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index e26222f474..20ec6e0bb2 100644 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -646,7 +646,7 @@ _evas_outbuf_redraws_clear(Outbuf *ob) if (!ob->priv.rect_count) return; wls = ecore_wl2_window_surface_get(ob->info->info.wl2_win); if (wls) - ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count, ob->hidden); + ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count); free(ob->priv.rects); ob->priv.rect_count = 0; } diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index 5246b49e69..961cf46620 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -542,7 +542,7 @@ _evas_shm_surface_data_get(Surface *s, int *w, int *h) } void -_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) +_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count) { Ecore_Wl2_Window *win; struct wl_surface *wls; @@ -558,13 +558,10 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei win = s->info->info.wl2_win; wls = ecore_wl2_window_surface_get(win); - if (!hidden) - { - ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE); + ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE); - _evas_surface_damage(wls, surf->compositor_version, - leaf->w, leaf->h, rects, count); - } + _evas_surface_damage(wls, surf->compositor_version, + leaf->w, leaf->h, rects, count); ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); --
