summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-09-14 12:30:12 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commit656d892581c64c8c2adf854a316fd542738e7070 (patch)
tree1596f9838ad4a89a47c4c9fee79efc92a9d89944
parentc72b0b44ad69c6c5ab6396e12831bc99d373b3b9 (diff)
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.
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c14
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c11
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 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)
456 new_data = surf->funcs.data_get(surf, NULL, NULL); 456 new_data = surf->funcs.data_get(surf, NULL, NULL);
457 for (y = 0; y < h; y++) 457 for (y = 0; y < h; y++)
458 memcpy(new_data + y * w * 4, old_data + y * b->stride, w * 4); 458 memcpy(new_data + y * w * 4, old_data + y * b->stride, w * 4);
459 surf->funcs.post(surf, NULL, 0, EINA_FALSE); 459 surf->funcs.post(surf, NULL, 0);
460 _buffer_manager_unmap(b); 460 _buffer_manager_unmap(b);
461 b->mapping = NULL; 461 b->mapping = NULL;
462 462
@@ -679,7 +679,7 @@ _evas_dmabuf_surface_assign(Surface *s)
679} 679}
680 680
681static void 681static void
682_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) 682_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count)
683{ 683{
684 struct wl_surface *wls; 684 struct wl_surface *wls;
685 Dmabuf_Surface *surface; 685 Dmabuf_Surface *surface;
@@ -711,12 +711,10 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count,
711 711
712 win = s->info->info.wl2_win; 712 win = s->info->info.wl2_win;
713 wls = ecore_wl2_window_surface_get(win); 713 wls = ecore_wl2_window_surface_get(win);
714 if (!hidden) 714
715 { 715 ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE);
716 ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE); 716 _evas_surface_damage(wls, surface->compositor_version,
717 _evas_surface_damage(wls, surface->compositor_version, 717 b->w, b->h, rects, count);
718 b->w, b->h, rects, count);
719 }
720 718
721 ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); 719 ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE);
722} 720}
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
100 void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags, Eina_Bool force); 100 void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags, Eina_Bool force);
101 void *(*data_get)(Surface *surface, int *w, int *h); 101 void *(*data_get)(Surface *surface, int *w, int *h);
102 int (*assign)(Surface *surface); 102 int (*assign)(Surface *surface);
103 void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden); 103 void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int count);
104 } funcs; 104 } funcs;
105}; 105};
106 106
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)
646 if (!ob->priv.rect_count) return; 646 if (!ob->priv.rect_count) return;
647 wls = ecore_wl2_window_surface_get(ob->info->info.wl2_win); 647 wls = ecore_wl2_window_surface_get(ob->info->info.wl2_win);
648 if (wls) 648 if (wls)
649 ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count, ob->hidden); 649 ob->surface->funcs.post(ob->surface, ob->priv.rects, ob->priv.rect_count);
650 free(ob->priv.rects); 650 free(ob->priv.rects);
651 ob->priv.rect_count = 0; 651 ob->priv.rect_count = 0;
652} 652}
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)
542} 542}
543 543
544void 544void
545_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) 545_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count)
546{ 546{
547 Ecore_Wl2_Window *win; 547 Ecore_Wl2_Window *win;
548 struct wl_surface *wls; 548 struct wl_surface *wls;
@@ -558,13 +558,10 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei
558 win = s->info->info.wl2_win; 558 win = s->info->info.wl2_win;
559 wls = ecore_wl2_window_surface_get(win); 559 wls = ecore_wl2_window_surface_get(win);
560 560
561 if (!hidden) 561 ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE);
562 {
563 ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE);
564 562
565 _evas_surface_damage(wls, surf->compositor_version, 563 _evas_surface_damage(wls, surf->compositor_version,
566 leaf->w, leaf->h, rects, count); 564 leaf->w, leaf->h, rects, count);
567 }
568 565
569 ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE); 566 ecore_wl2_window_commit(s->info->info.wl2_win, EINA_TRUE);
570 567