ecore_wl2: Add alpha to reconfigure

Currently we only ever make wayland windows with alpha, this is a step
towards changing that.
This commit is contained in:
Derek Foreman 2018-02-08 11:56:30 -06:00
parent d85e960060
commit 6da0933d60
4 changed files with 8 additions and 7 deletions

View File

@ -432,7 +432,7 @@ typedef struct _Ecore_Wl2_Surface_Interface
void *(*setup)(Ecore_Wl2_Window *win); void *(*setup)(Ecore_Wl2_Window *win);
void (*destroy)(Ecore_Wl2_Surface *surface, void *priv_data); void (*destroy)(Ecore_Wl2_Surface *surface, void *priv_data);
void (*reconfigure)(Ecore_Wl2_Surface *surface, void *priv_data, int w, int h, uint32_t flags); void (*reconfigure)(Ecore_Wl2_Surface *surface, void *priv_data, int w, int h, uint32_t flags, Eina_Bool alpha);
void *(*data_get)(Ecore_Wl2_Surface *surface, void *priv_data, int *w, int *h); void *(*data_get)(Ecore_Wl2_Surface *surface, void *priv_data, int *w, int *h);
int (*assign)(Ecore_Wl2_Surface *surface, void *priv_data); int (*assign)(Ecore_Wl2_Surface *surface, void *priv_data);
void (*post)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Rectangle *rects, unsigned int count); void (*post)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Rectangle *rects, unsigned int count);
@ -2015,7 +2015,7 @@ EAPI Eina_Bool ecore_wl2_buffer_fit(Ecore_Wl2_Buffer *b, int w, int h);
EAPI Ecore_Wl2_Surface *ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha); EAPI Ecore_Wl2_Surface *ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha);
EAPI void ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface); EAPI void ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface);
EAPI void ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags); EAPI void ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags, Eina_Bool alpha);
EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h); EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h);
EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface); EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface);
EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count); EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count);

View File

@ -27,13 +27,14 @@ ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface)
} }
EAPI void EAPI void
ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags) ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags, Eina_Bool alpha)
{ {
EINA_SAFETY_ON_NULL_RETURN(surface); EINA_SAFETY_ON_NULL_RETURN(surface);
surface->funcs->reconfigure(surface, surface->private_data, w, h, flags); surface->funcs->reconfigure(surface, surface->private_data, w, h, flags, alpha);
surface->w = w; surface->w = w;
surface->h = h; surface->h = h;
surface->alpha = alpha;
} }
EAPI void * EAPI void *

View File

@ -47,7 +47,7 @@ _evas_dmabuf_surface_setup(Ecore_Wl2_Window *win)
} }
static void static void
_evas_dmabuf_surface_reconfigure(Ecore_Wl2_Surface *s EINA_UNUSED, void *priv_data, int w, int h, uint32_t flags EINA_UNUSED) _evas_dmabuf_surface_reconfigure(Ecore_Wl2_Surface *s EINA_UNUSED, void *priv_data, int w, int h, uint32_t flags EINA_UNUSED, Eina_Bool alpha EINA_UNUSED)
{ {
Ecore_Wl2_Dmabuf_Private *p; Ecore_Wl2_Dmabuf_Private *p;
Ecore_Wl2_Buffer *b; Ecore_Wl2_Buffer *b;

View File

@ -285,11 +285,11 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
if ((ob->rotation == 0) || (ob->rotation == 180)) if ((ob->rotation == 0) || (ob->rotation == 180))
{ {
ecore_wl2_surface_reconfigure(ob->surface, w, h, resize); ecore_wl2_surface_reconfigure(ob->surface, w, h, resize, alpha);
} }
else if ((ob->rotation == 90) || (ob->rotation == 270)) else if ((ob->rotation == 90) || (ob->rotation == 270))
{ {
ecore_wl2_surface_reconfigure(ob->surface, h, w, resize); ecore_wl2_surface_reconfigure(ob->surface, h, w, resize, alpha);
} }
_evas_outbuf_idle_flush(ob); _evas_outbuf_idle_flush(ob);