wayland_shm: Pass alpha to surface_create

Stop extracting it from other structures, pass it directly.
This commit is contained in:
Derek Foreman 2017-11-29 15:50:12 -06:00
parent 2b3654c1fd
commit 7eb0af45d6
3 changed files with 5 additions and 4 deletions

View File

@ -169,7 +169,7 @@ _evas_dmabuf_surface_destroy(Surface *s)
}
Surface *
_evas_surface_create(Ecore_Wl2_Window *win, Evas_Engine_Info_Wayland *info, Outbuf *ob)
_evas_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha, Evas_Engine_Info_Wayland *info, Outbuf *ob)
{
Surface *out = NULL;
Dmabuf_Surface *surf = NULL;
@ -192,7 +192,7 @@ _evas_surface_create(Ecore_Wl2_Window *win, Evas_Engine_Info_Wayland *info, Outb
out->dmabuf = surf;
surf->surface = out;
surf->alpha = info->info.destination_alpha;
surf->alpha = alpha;
surf->w = 0;
surf->h = 0;

View File

@ -125,7 +125,7 @@ struct _Outbuf
Eina_Bool dirty : 1;
};
Surface *_evas_surface_create(Ecore_Wl2_Window *win, Evas_Engine_Info_Wayland *info, Outbuf *ob);
Surface *_evas_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha, Evas_Engine_Info_Wayland *info, Outbuf *ob);
Outbuf *_evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info);
void _evas_outbuf_free(Outbuf *ob);

View File

@ -28,7 +28,8 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info)
ob->priv.destination_alpha = info->info.destination_alpha;
ob->ewd = ecore_wl2_window_display_get(info->info.wl2_win);
ob->surface = _evas_surface_create(info->info.wl2_win, info, ob);
ob->surface = _evas_surface_create(info->info.wl2_win,
ob->priv.destination_alpha, info, ob);
if (!ob->surface) goto surf_err;
eina_array_step_set(&ob->priv.onebuf_regions, sizeof(Eina_Array), 8);