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 a7927cfa8f..b9f793997e 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 @@ -1821,18 +1821,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) { @@ -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 f41287190e..07e4f6210e 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 @@ -467,47 +466,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize) ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); } -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) { 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 d139a43963..a9aaddc9d8 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 166c4a6858..26d8f7955f 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 @@ -396,46 +395,6 @@ _ecore_evas_wl_rotation_set(Ecore_Evas *ee, int rotation, int resize) ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); } -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) {