wayland_shm: Remove hidden from surface posting calls
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 14 Sep 2017 17:30:12 +0000 (12:30 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Thu, 12 Oct 2017 17:24:03 +0000 (12:24 -0500)
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
src/modules/evas/engines/wayland_shm/evas_engine.h
src/modules/evas/engines/wayland_shm/evas_outbuf.c
src/modules/evas/engines/wayland_shm/evas_shm.c

index cdd01a4..02e5c9c 100644 (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);
 }
index ca6a172..d7302f4 100644 (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;
 };
 
index e26222f..20ec6e0 100644 (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;
 }
index 5246b49..961cf46 100644 (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);