forked from enlightenment/efl
ecore_evas/wayland_shm: Delay some operations when in_async_render.
This commit is contained in:
parent
868206826a
commit
aba3064184
|
@ -38,6 +38,9 @@ static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static int _ecore_evas_wl_common_render_updates_process(Ecore_Evas *ee, Eina_List *updates);
|
static int _ecore_evas_wl_common_render_updates_process(Ecore_Evas *ee, Eina_List *updates);
|
||||||
void _ecore_evas_wl_common_render_updates(void *data, Evas *evas EINA_UNUSED, void *event);
|
void _ecore_evas_wl_common_render_updates(void *data, Evas *evas EINA_UNUSED, void *event);
|
||||||
|
static void _rotation_do(Ecore_Evas *ee, int rotation, int resize);
|
||||||
|
static void _ecore_evas_wayland_alpha_do(Ecore_Evas *ee, int alpha);
|
||||||
|
static void _ecore_evas_wayland_transparent_do(Ecore_Evas *ee, int transparent);
|
||||||
|
|
||||||
/* Frame listener */
|
/* Frame listener */
|
||||||
static void _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t tm);
|
static void _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t tm);
|
||||||
|
@ -267,8 +270,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
_ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
_rotation_do(Ecore_Evas *ee, int rotation, int resize)
|
||||||
{
|
{
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
int rot_dif;
|
int rot_dif;
|
||||||
|
@ -371,6 +374,19 @@ _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize)
|
||||||
|
{
|
||||||
|
if (ee->in_async_render)
|
||||||
|
{
|
||||||
|
ee->delayed.rotation = rotation;
|
||||||
|
ee->delayed.rotation_resize = resize;
|
||||||
|
ee->delayed.rotation_changed = EINA_TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_rotation_do(ee, rotation, resize);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_ecore_evas_wl_common_init(void)
|
_ecore_evas_wl_common_init(void)
|
||||||
{
|
{
|
||||||
|
@ -1046,6 +1062,22 @@ _ecore_evas_wl_common_render_updates(void *data, Evas *evas EINA_UNUSED, void *e
|
||||||
ee->in_async_render = EINA_FALSE;
|
ee->in_async_render = EINA_FALSE;
|
||||||
|
|
||||||
_ecore_evas_wl_common_render_updates_process(ee, ev->updated_area);
|
_ecore_evas_wl_common_render_updates_process(ee, ev->updated_area);
|
||||||
|
|
||||||
|
if (ee->delayed.alpha_changed)
|
||||||
|
{
|
||||||
|
_ecore_evas_wayland_alpha_do(ee, ee->delayed.alpha);
|
||||||
|
ee->delayed.alpha_changed = EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (ee->delayed.transparent_changed)
|
||||||
|
{
|
||||||
|
_ecore_evas_wayland_transparent_do(ee, ee->delayed.transparent);
|
||||||
|
ee->delayed.transparent_changed = EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (ee->delayed.rotation_changed)
|
||||||
|
{
|
||||||
|
_rotation_do(ee, ee->delayed.rotation, ee->delayed.rotation_resize);
|
||||||
|
ee->delayed.rotation_changed = EINA_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1183,6 +1215,30 @@ _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;
|
||||||
|
if (!strcmp(ee->driver, "wayland_shm"))
|
||||||
|
{
|
||||||
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
||||||
|
_ecore_evas_wayland_shm_transparent_do(ee, transparent);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
_ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,6 +74,8 @@ void _ecore_evas_wl_common_frame_border_size_set(Evas_Object *obj, int fx, int f
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
||||||
void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
|
void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location);
|
||||||
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
||||||
|
|
|
@ -445,8 +445,8 @@ _ecore_evas_wl_hide(Ecore_Evas *ee)
|
||||||
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
|
_ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int alpha)
|
||||||
{
|
{
|
||||||
Evas_Engine_Info_Wayland_Shm *einfo;
|
Evas_Engine_Info_Wayland_Shm *einfo;
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
|
@ -483,8 +483,20 @@ _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
|
||||||
ecore_wl_window_update_size(win, ee->w + fw, ee->h + fh);
|
ecore_wl_window_update_size(win, ee->w + fw, ee->h + fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
|
_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_Shm *einfo;
|
Evas_Engine_Info_Wayland_Shm *einfo;
|
||||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
|
@ -514,6 +526,18 @@ _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
|
||||||
ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
|
ecore_wl_window_update_size(wdata->win, ee->w + fw, ee->h + fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
|
||||||
|
{
|
||||||
|
if (ee->in_async_render)
|
||||||
|
{
|
||||||
|
ee->delayed.transparent = transparent;
|
||||||
|
ee->delayed.transparent_changed = EINA_TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_ecore_evas_wayland_shm_transparent_do(ee, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
|
_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue