wayland_shm: Remove Shm_Surface
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 27 Nov 2017 22:12:12 +0000 (16:12 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 1 Dec 2017 16:58:44 +0000 (10:58 -0600)
only Dmabuf_Surface is used, so let's remove this and lose the union.

src/modules/evas/engines/wayland_shm/evas_dmabuf.c
src/modules/evas/engines/wayland_shm/evas_engine.h

index e2cd550..53a5a79 100644 (file)
@@ -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;
index 52ca61e..08821f6 100644 (file)
@@ -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
      {