From: Derek Foreman Date: Thu, 14 Sep 2017 17:30:12 +0000 (-0500) Subject: wayland_shm: Remove hidden from surface posting calls X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2288 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=656d892581c64c8c2adf854a316fd542738e7070;p=platform%2Fupstream%2Fefl.git 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. --- diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index cdd01a4..02e5c9c 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 ca6a172..d7302f4 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 e26222f..20ec6e0 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 5246b49..961cf46 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);