ecore_wl2: Add alpha to reconfigure
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 8 Feb 2018 17:56:30 +0000 (11:56 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 30 May 2018 04:15:52 +0000 (13:15 +0900)
Currently we only ever make wayland windows with alpha, this is a step
towards changing that.

src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_surface.c
src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 4165f83..3495ab9 100644 (file)
@@ -627,7 +627,7 @@ typedef struct _Ecore_Wl2_Surface_Interface
 
    void *(*setup)(Ecore_Wl2_Window *win);
    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);
    int  (*assign)(Ecore_Wl2_Surface *surface, void *priv_data);
    void (*post)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Rectangle *rects, unsigned int count);
@@ -2321,7 +2321,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 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 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);
index 3aad5f6..17da655 100644 (file)
@@ -27,13 +27,14 @@ 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)
+ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags, Eina_Bool alpha)
 {
    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->h = h;
+   surface->alpha = alpha;
 }
 
 EAPI void *
index d9baeff..34a1edd 100644 (file)
@@ -47,7 +47,7 @@ _evas_dmabuf_surface_setup(Ecore_Wl2_Window *win)
 }
 
 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_Buffer *b;
index 14eb98f..586b7a0 100755 (executable)
@@ -314,11 +314,11 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth,
 
    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))
      {
-        ecore_wl2_surface_reconfigure(ob->surface, h, w, resize);
+        ecore_wl2_surface_reconfigure(ob->surface, h, w, resize, alpha);
      }
 
    _evas_outbuf_idle_flush(ob);