From 73d1ab0cd5ab2cc760a5d7ba7fc07df4a7fde1d4 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 27 Nov 2017 16:12:12 -0600 Subject: [PATCH] wayland_shm: Remove Shm_Surface only Dmabuf_Surface is used, so let's remove this and lose the union. --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 12 ++++++------ src/modules/evas/engines/wayland_shm/evas_engine.h | 7 +------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index e2cd550..53a5a79 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -26,7 +26,7 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_U Dmabuf_Surface *surface; if ((!w) || (!h)) return; - surface = s->surf.dmabuf; + surface = s->dmabuf; EINA_LIST_FOREACH_SAFE(surface->buffers, l, tmp, b) { int stride = b->stride; @@ -49,7 +49,7 @@ _evas_dmabuf_surface_data_get(Surface *s, int *w, int *h) Ecore_Wl2_Buffer *b; void *ptr; - surface = s->surf.dmabuf; + surface = s->dmabuf; b = surface->current; if (!b) return NULL; @@ -105,7 +105,7 @@ _evas_dmabuf_surface_assign(Surface *s) Eina_List *l; Dmabuf_Surface *surface; - surface = s->surf.dmabuf; + surface = s->dmabuf; surface->current = _evas_dmabuf_surface_wait(surface); if (!surface->current) { @@ -132,7 +132,7 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count) Ecore_Wl2_Buffer *b; Ecore_Wl2_Window *win; - surface = s->surf.dmabuf; + surface = s->dmabuf; b = surface->current; if (!b) return; @@ -157,7 +157,7 @@ _evas_dmabuf_surface_destroy(Surface *s) Dmabuf_Surface *surface; if (!s) return; - surface = s->surf.dmabuf; + surface = s->dmabuf; EINA_LIST_FREE(surface->buffers, b) ecore_wl2_buffer_destroy(b); @@ -185,7 +185,7 @@ _evas_surface_create(Evas_Engine_Info_Wayland *info, Outbuf *ob) types |= ECORE_WL2_BUFFER_DMABUF; if (!(surf = calloc(1, sizeof(Dmabuf_Surface)))) goto err; - out->surf.dmabuf = surf; + out->dmabuf = surf; surf->surface = out; surf->alpha = info->info.destination_alpha; diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index 52ca61e..08821f6 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -72,18 +72,13 @@ extern int _evas_engine_way_shm_log_dom; # define MAX_BUFFERS 4 -typedef struct _Shm_Surface Shm_Surface; typedef struct _Dmabuf_Surface Dmabuf_Surface; typedef struct _Surface Surface; struct _Surface { Outbuf *ob; - union - { - Shm_Surface *shm; - Dmabuf_Surface *dmabuf; - } surf; + Dmabuf_Surface *dmabuf; Evas_Engine_Info_Wayland *info; struct { -- 2.7.4