forked from enlightenment/efl
wayland_shm: Remove Shm_Surface
only Dmabuf_Surface is used, so let's remove this and lose the union.
This commit is contained in:
parent
e3d6626c0d
commit
73d1ab0cd5
|
@ -26,7 +26,7 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_U
|
||||||
Dmabuf_Surface *surface;
|
Dmabuf_Surface *surface;
|
||||||
|
|
||||||
if ((!w) || (!h)) return;
|
if ((!w) || (!h)) return;
|
||||||
surface = s->surf.dmabuf;
|
surface = s->dmabuf;
|
||||||
EINA_LIST_FOREACH_SAFE(surface->buffers, l, tmp, b)
|
EINA_LIST_FOREACH_SAFE(surface->buffers, l, tmp, b)
|
||||||
{
|
{
|
||||||
int stride = b->stride;
|
int stride = b->stride;
|
||||||
|
@ -49,7 +49,7 @@ _evas_dmabuf_surface_data_get(Surface *s, int *w, int *h)
|
||||||
Ecore_Wl2_Buffer *b;
|
Ecore_Wl2_Buffer *b;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
surface = s->surf.dmabuf;
|
surface = s->dmabuf;
|
||||||
b = surface->current;
|
b = surface->current;
|
||||||
if (!b) return NULL;
|
if (!b) return NULL;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ _evas_dmabuf_surface_assign(Surface *s)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Dmabuf_Surface *surface;
|
Dmabuf_Surface *surface;
|
||||||
|
|
||||||
surface = s->surf.dmabuf;
|
surface = s->dmabuf;
|
||||||
surface->current = _evas_dmabuf_surface_wait(surface);
|
surface->current = _evas_dmabuf_surface_wait(surface);
|
||||||
if (!surface->current)
|
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_Buffer *b;
|
||||||
Ecore_Wl2_Window *win;
|
Ecore_Wl2_Window *win;
|
||||||
|
|
||||||
surface = s->surf.dmabuf;
|
surface = s->dmabuf;
|
||||||
b = surface->current;
|
b = surface->current;
|
||||||
if (!b) return;
|
if (!b) return;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ _evas_dmabuf_surface_destroy(Surface *s)
|
||||||
Dmabuf_Surface *surface;
|
Dmabuf_Surface *surface;
|
||||||
|
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
surface = s->surf.dmabuf;
|
surface = s->dmabuf;
|
||||||
|
|
||||||
EINA_LIST_FREE(surface->buffers, b)
|
EINA_LIST_FREE(surface->buffers, b)
|
||||||
ecore_wl2_buffer_destroy(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;
|
types |= ECORE_WL2_BUFFER_DMABUF;
|
||||||
|
|
||||||
if (!(surf = calloc(1, sizeof(Dmabuf_Surface)))) goto err;
|
if (!(surf = calloc(1, sizeof(Dmabuf_Surface)))) goto err;
|
||||||
out->surf.dmabuf = surf;
|
out->dmabuf = surf;
|
||||||
|
|
||||||
surf->surface = out;
|
surf->surface = out;
|
||||||
surf->alpha = info->info.destination_alpha;
|
surf->alpha = info->info.destination_alpha;
|
||||||
|
|
|
@ -72,18 +72,13 @@ extern int _evas_engine_way_shm_log_dom;
|
||||||
|
|
||||||
# define MAX_BUFFERS 4
|
# define MAX_BUFFERS 4
|
||||||
|
|
||||||
typedef struct _Shm_Surface Shm_Surface;
|
|
||||||
typedef struct _Dmabuf_Surface Dmabuf_Surface;
|
typedef struct _Dmabuf_Surface Dmabuf_Surface;
|
||||||
|
|
||||||
typedef struct _Surface Surface;
|
typedef struct _Surface Surface;
|
||||||
struct _Surface
|
struct _Surface
|
||||||
{
|
{
|
||||||
Outbuf *ob;
|
Outbuf *ob;
|
||||||
union
|
Dmabuf_Surface *dmabuf;
|
||||||
{
|
|
||||||
Shm_Surface *shm;
|
|
||||||
Dmabuf_Surface *dmabuf;
|
|
||||||
} surf;
|
|
||||||
Evas_Engine_Info_Wayland *info;
|
Evas_Engine_Info_Wayland *info;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue