forked from enlightenment/efl
wayland_shm: pass engine info to shm_surface_create
Gratuitous change to pass less parameters and make some code prettier.
This commit is contained in:
parent
0ada4d3d56
commit
8635f56aeb
|
@ -125,7 +125,7 @@ struct _Outbuf
|
|||
} priv;
|
||||
};
|
||||
|
||||
Surface *_evas_shm_surface_create(struct wl_display *disp, struct wl_shm *shm, struct wl_surface *surface, int w, int h, int num_buff, Eina_Bool alpha, int compositor_version);
|
||||
Surface *_evas_shm_surface_create(Evas_Engine_Info_Wayland_Shm *info, int w, int h, int num_buff);
|
||||
|
||||
Outbuf *_evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland_Shm *info);
|
||||
void _evas_outbuf_free(Outbuf *ob);
|
||||
|
|
|
@ -57,12 +57,7 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland_Shm *info)
|
|||
}
|
||||
else goto unhandled_rotation;
|
||||
|
||||
ob->surface = _evas_shm_surface_create(info->info.wl_disp,
|
||||
info->info.wl_shm,
|
||||
info->info.wl_surface,
|
||||
sw, sh, ob->num_buff,
|
||||
info->info.destination_alpha,
|
||||
info->info.compositor_version);
|
||||
ob->surface = _evas_shm_surface_create(info, sw, sh, ob->num_buff);
|
||||
if (!ob->surface) goto surf_err;
|
||||
|
||||
unhandled_rotation:
|
||||
|
|
|
@ -569,7 +569,7 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count)
|
|||
}
|
||||
|
||||
Surface *
|
||||
_evas_shm_surface_create(struct wl_display *disp, struct wl_shm *shm, struct wl_surface *surface, int w, int h, int num_buff, Eina_Bool alpha, int compositor_version)
|
||||
_evas_shm_surface_create(Evas_Engine_Info_Wayland_Shm *info, int w, int h, int num_buff)
|
||||
{
|
||||
Surface *s;
|
||||
Shm_Surface *surf;
|
||||
|
@ -584,12 +584,12 @@ _evas_shm_surface_create(struct wl_display *disp, struct wl_shm *shm, struct wl_
|
|||
|
||||
surf->w = w;
|
||||
surf->h = h;
|
||||
surf->disp = disp;
|
||||
surf->shm = shm;
|
||||
surf->surface = surface;
|
||||
surf->disp = info->info.wl_disp;
|
||||
surf->shm = info->info.wl_shm;
|
||||
surf->surface = info->info.wl_surface;
|
||||
surf->num_buff = num_buff;
|
||||
surf->alpha = alpha;
|
||||
surf->compositor_version = compositor_version;
|
||||
surf->alpha = info->info.destination_alpha;
|
||||
surf->compositor_version = info->info.compositor_version;
|
||||
|
||||
/* create surface buffers */
|
||||
for (; i < surf->num_buff; i++)
|
||||
|
|
Loading…
Reference in New Issue