derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9ca6e274a4060912e79dcab0bb7d0d32e595a307

commit 9ca6e274a4060912e79dcab0bb7d0d32e595a307
Author: Derek Foreman <[email protected]>
Date:   Tue Nov 1 16:34:26 2016 -0500

    ecore_evas_wayland: Make alpha set common
    
    Moves alpha set into the common implementation - there is a functional
    change here - the egl engine now calls alpha_do in render_updates like
    the shm engine.
    
    It is probable that this was the intended behaviour all along.
---
 .../engines/wayland/ecore_evas_wayland_common.c    | 53 +++++++++++++++++-----
 .../engines/wayland/ecore_evas_wayland_egl.c       | 44 +-----------------
 .../engines/wayland/ecore_evas_wayland_private.h   |  2 +-
 .../engines/wayland/ecore_evas_wayland_shm.c       | 43 +-----------------
 4 files changed, 44 insertions(+), 98 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index a7927cf..b9f7939 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -1822,18 +1822,6 @@ _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
 }
 
 static void
-_ecore_evas_wayland_alpha_do(Ecore_Evas *ee, int alpha)
-{
-   if (!ee) return;
-   if (!strcmp(ee->driver, "wayland_shm"))
-     {
-#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
-        _ecore_evas_wayland_shm_alpha_do(ee, alpha);
-#endif
-     }
-}
-
-static void
 _ecore_evas_wayland_transparent_do(Ecore_Evas *ee, int transparent)
 {
    if (!ee) return;
@@ -2006,3 +1994,44 @@ _ecore_evas_wl_common_hide(Ecore_Evas *ee)
 
    if (ee->func.fn_hide) ee->func.fn_hide(ee);
 }
+
+static void
+_ecore_evas_wayland_alpha_do(Ecore_Evas *ee, int alpha)
+{
+   Evas_Engine_Info_Wayland *einfo;
+   Ecore_Evas_Engine_Wl_Data *wdata;
+   int fw, fh;
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+   if (!ee) return;
+   if (ee->alpha == alpha) return;
+   ee->alpha = alpha;
+   wdata = ee->engine.data;
+   if (!wdata->sync_done) return;
+
+   if (wdata->win) ecore_wl2_window_alpha_set(wdata->win, ee->alpha);
+
+   evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
+
+   if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
+     {
+        einfo->info.destination_alpha = EINA_TRUE;
+        if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+          ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
+        evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
+     }
+}
+
+void
+_ecore_evas_wl_common_alpha_set(Ecore_Evas *ee, int alpha)
+{
+   if (ee->in_async_render)
+     {
+        ee->delayed.alpha = alpha;
+        ee->delayed.alpha_changed = EINA_TRUE;
+        return;
+     }
+
+   _ecore_evas_wayland_alpha_do(ee, alpha);
+}
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index f412871..07e4f62 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -34,7 +34,6 @@ extern EAPI Eina_List *_evas_canvas_image_data_unset(Evas 
*eo_e);
 extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
 
 /* local function prototypes */
-static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha);
 static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
 static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int 
resize);
 
@@ -85,7 +84,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    _ecore_evas_wl_common_withdrawn_set,
    NULL, // func sticky set
    _ecore_evas_wl_common_ignore_events_set,
-   _ecore_evas_wl_alpha_set,
+   _ecore_evas_wl_common_alpha_set,
    _ecore_evas_wl_transparent_set,
    NULL, // func profiles set
    NULL, // func profile set
@@ -468,47 +467,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, 
int resize)
 }
 
 static void 
-_ecore_evas_wayland_egl_alpha_do(Ecore_Evas *ee, int alpha)
-{
-   Evas_Engine_Info_Wayland *einfo;
-   Ecore_Evas_Engine_Wl_Data *wdata;
-   int fw, fh;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   if (!ee) return;
-   if (ee->alpha == alpha) return;
-   ee->alpha = alpha;
-   wdata = ee->engine.data;
-   if (!wdata->sync_done) return;
-
-   if (wdata->win) ecore_wl2_window_alpha_set(wdata->win, ee->alpha);
-
-   evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
-
-   if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
-     {
-        einfo->info.destination_alpha = EINA_TRUE;
-        if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
-          ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
-        evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
-     }
-}
-
-static void
-_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
-{
-   if (ee->in_async_render)
-     {
-        ee->delayed.alpha = alpha;
-        ee->delayed.alpha_changed = EINA_TRUE;
-        return;
-     }
-
-   _ecore_evas_wayland_egl_alpha_do(ee, alpha);
-}
-
-static void 
 _ecore_evas_wayland_egl_transparent_do(Ecore_Evas *ee, int transparent)
 {
    Evas_Engine_Info_Wayland *einfo;
diff --git 
a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
index d139a43..a9aaddc 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
@@ -98,6 +98,7 @@ void _ecore_evas_wl_common_borderless_set(Ecore_Evas *ee, 
Eina_Bool on);
 void _ecore_evas_wl_common_withdrawn_set(Ecore_Evas *ee, Eina_Bool on);
 void _ecore_evas_wl_common_show(Ecore_Evas *ee);
 void _ecore_evas_wl_common_hide(Ecore_Evas *ee);
+void _ecore_evas_wl_common_alpha_set(Ecore_Evas *ee, int alpha);
 
 void _ecore_evas_wl_common_frame_callback_clean(Ecore_Evas *ee);
 
@@ -112,7 +113,6 @@ extern Eina_List *ee_list;
 void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
 void _ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge);
 void _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent);
-void _ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int transparent);
 #endif
 
 #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 166c4a6..26d8f79 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -31,7 +31,6 @@
 #endif /* ! _WIN32 */
 
 /* local function prototypes */
-static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha);
 static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
 static void _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int 
resize);
 
@@ -82,7 +81,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
    _ecore_evas_wl_common_withdrawn_set,
    NULL, // func sticky set
    _ecore_evas_wl_common_ignore_events_set,
-   _ecore_evas_wl_alpha_set,
+   _ecore_evas_wl_common_alpha_set,
    _ecore_evas_wl_transparent_set,
    NULL, // func profiles set
    NULL, // func profile set
@@ -397,46 +396,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, 
int resize)
 }
 
 void
-_ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int alpha)
-{
-   Evas_Engine_Info_Wayland *einfo;
-   Ecore_Evas_Engine_Wl_Data *wdata;
-   int fw, fh;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   if (!ee) return;
-   if (ee->alpha == alpha) return;
-   ee->alpha = alpha;
-   wdata = ee->engine.data;
-   if (!wdata->sync_done) return;
-
-   if (wdata->win) ecore_wl2_window_alpha_set(wdata->win, ee->alpha);
-
-   evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
-
-   if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
-     {
-        einfo->info.destination_alpha = EINA_TRUE;//ee->alpha;
-        if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
-          ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
-        evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
-     }
-}
-
-static void
-_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
-{
-   if (ee->in_async_render)
-     {
-        ee->delayed.alpha = alpha;
-        ee->delayed.alpha_changed = EINA_TRUE;
-        return;
-     }
-   _ecore_evas_wayland_shm_alpha_do(ee, alpha);
-}
-
-void
 _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent)
 {
    Evas_Engine_Info_Wayland *einfo;

-- 


Reply via email to