summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-09-11 17:16:17 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commit4a23e69bcc506b5ac7a77fa01044c26c4cc0c743 (patch)
treeb1b26e4c39d75fa4d250e74f5ab32065cb4e7772
parent2b9a22e3a9aeb5b18913468744039da4628d7414 (diff)
wayland_shm: Remove surface_set function
Now that we use the display's shm and dmabuf pointers we don't need to update them.
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c15
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c3
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_outbuf.c6
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c15
5 files changed, 0 insertions, 41 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 0b5f5f7..6045b8f 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -776,20 +776,6 @@ _evas_dmabuf_surface_destroy(Surface *s)
776} 776}
777 777
778Eina_Bool 778Eina_Bool
779_evas_dmabuf_surface_surface_set(Surface *s, struct wl_shm *wl_shm EINA_UNUSED, struct zwp_linux_dmabuf_v1 *wl_dmabuf)
780{
781 Dmabuf_Surface *surf;
782
783 surf = s->surf.dmabuf;
784
785 if ((surf->dmabuf == wl_dmabuf))
786 return EINA_FALSE;
787
788 surf->dmabuf = wl_dmabuf;
789 return EINA_TRUE;
790}
791
792Eina_Bool
793_evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff) 779_evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff)
794{ 780{
795 Dmabuf_Surface *surf = NULL; 781 Dmabuf_Surface *surf = NULL;
@@ -835,7 +821,6 @@ _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff)
835 s->funcs.data_get = _evas_dmabuf_surface_data_get; 821 s->funcs.data_get = _evas_dmabuf_surface_data_get;
836 s->funcs.assign = _evas_dmabuf_surface_assign; 822 s->funcs.assign = _evas_dmabuf_surface_assign;
837 s->funcs.post = _evas_dmabuf_surface_post; 823 s->funcs.post = _evas_dmabuf_surface_post;
838 s->funcs.surface_set = _evas_dmabuf_surface_surface_set;
839 824
840 return EINA_TRUE; 825 return EINA_TRUE;
841 826
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 786ddb4..0131d36 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -140,9 +140,6 @@ eng_output_update(void *engine, void *data, void *info, unsigned int w, unsigned
140 ob->dirty = EINA_TRUE; 140 ob->dirty = EINA_TRUE;
141 re->generic.ob->ewd = einfo->info.wl2_display; 141 re->generic.ob->ewd = einfo->info.wl2_display;
142 } 142 }
143 _evas_outbuf_surface_set(ob,
144 einfo->info.wl_shm,
145 einfo->info.wl_dmabuf);
146 143
147 eng_output_resize(engine, data, w, h); 144 eng_output_resize(engine, data, w, h);
148 145
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h
index b9393da..ca6a172 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -101,7 +101,6 @@ struct _Surface
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, Eina_Bool hidden);
104 Eina_Bool (*surface_set)(Surface *surface, struct wl_shm *wl_shm, struct zwp_linux_dmabuf_v1 *wl_dmabuf);
105 } funcs; 104 } funcs;
106}; 105};
107 106
@@ -157,7 +156,6 @@ void _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int
157void _evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); 156void _evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
158void _evas_surface_damage(struct wl_surface *s, int compositor_version, int w, int h, Eina_Rectangle *rects, unsigned int count); 157void _evas_surface_damage(struct wl_surface *s, int compositor_version, int w, int h, Eina_Rectangle *rects, unsigned int count);
159void _evas_outbuf_redraws_clear(Outbuf *ob); 158void _evas_outbuf_redraws_clear(Outbuf *ob);
160void _evas_outbuf_surface_set(Outbuf *ob, struct wl_shm *shm, struct zwp_linux_dmabuf_v1 *dmabuf);
161 159
162Eina_Bool _evas_surface_init(Surface *s, int w, int h, int num_buf); 160Eina_Bool _evas_surface_init(Surface *s, int w, int h, int num_buf);
163 161
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index 1f599e1..e26222f 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -650,9 +650,3 @@ _evas_outbuf_redraws_clear(Outbuf *ob)
650 free(ob->priv.rects); 650 free(ob->priv.rects);
651 ob->priv.rect_count = 0; 651 ob->priv.rect_count = 0;
652} 652}
653
654void
655_evas_outbuf_surface_set(Outbuf *ob, struct wl_shm *wl_shm, struct zwp_linux_dmabuf_v1 *wl_dmabuf)
656{
657 ob->surface->funcs.surface_set(ob->surface, wl_shm, wl_dmabuf);
658}
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 6ad24c4..4553edc 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -576,20 +576,6 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei
576} 576}
577 577
578Eina_Bool 578Eina_Bool
579_evas_shm_surface_surface_set(Surface *s, struct wl_shm *wl_shm, struct zwp_linux_dmabuf_v1 *wl_dmabuf EINA_UNUSED)
580{
581 Shm_Surface *surf;
582
583 surf = s->surf.shm;
584
585 if ((surf->shm == wl_shm))
586 return EINA_FALSE;
587
588 surf->shm = wl_shm;
589 return EINA_TRUE;
590}
591
592Eina_Bool
593_evas_shm_surface_create(Surface *s, int w, int h, int num_buff) 579_evas_shm_surface_create(Surface *s, int w, int h, int num_buff)
594{ 580{
595 Shm_Surface *surf; 581 Shm_Surface *surf;
@@ -626,7 +612,6 @@ _evas_shm_surface_create(Surface *s, int w, int h, int num_buff)
626 s->funcs.data_get = _evas_shm_surface_data_get; 612 s->funcs.data_get = _evas_shm_surface_data_get;
627 s->funcs.assign = _evas_shm_surface_assign; 613 s->funcs.assign = _evas_shm_surface_assign;
628 s->funcs.post = _evas_shm_surface_post; 614 s->funcs.post = _evas_shm_surface_post;
629 s->funcs.surface_set = _evas_shm_surface_surface_set;
630 615
631 return EINA_TRUE; 616 return EINA_TRUE;
632 617