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.
This commit is contained in:
Derek Foreman 2017-09-14 12:30:12 -05:00
parent c72b0b44ad
commit 656d892581
4 changed files with 12 additions and 17 deletions

View File

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

View File

@ -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;
};

View File

@ -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;
}

View File

@ -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);