e comp - remove obsolete comp render animator and lock fps options

This commit is contained in:
Carsten Haitzler 2020-08-16 19:38:20 +01:00
parent 0a90a188a1
commit 1f4c6b41d8
3 changed files with 8 additions and 43 deletions

View File

@ -375,8 +375,6 @@ _e_comp_cb_update(void)
if (!e_comp) return EINA_FALSE;
if (e_comp->update_job)
e_comp->update_job = NULL;
else
ecore_animator_freeze(e_comp->render_animator);
DBG("UPDATE ALL");
if (e_comp->nocomp) goto nocomp;
// if (conf->grab && (!e_comp->grabbed))
@ -454,14 +452,6 @@ _e_comp_cb_update(void)
evas_object_resize(e_comp->canvas->fps_bg, w, h);
evas_object_move(e_comp->canvas->fps_fg, x + 4, y + 4);
}
if (conf->lock_fps)
{
DBG("MANUAL RENDER...");
// if (!e_comp->nocomp) ecore_evas_manual_render(e_comp->ee);
}
if (e_comp->updates && (!e_comp->update_job))
ecore_animator_thaw(e_comp->render_animator);
/*
if (doframeinfo == -1)
{
@ -533,12 +523,6 @@ _e_comp_cb_job(void *data EINA_UNUSED)
_e_comp_cb_update();
}
static Eina_Bool
_e_comp_cb_animator(void *data EINA_UNUSED)
{
return _e_comp_cb_update();
}
//////////////////////////////////////////////////////////////////////////
@ -846,7 +830,6 @@ _e_comp_free(E_Comp *c)
ecore_evas_free(c->ee);
if (c->render_animator) ecore_animator_del(c->render_animator);
if (c->update_job) ecore_job_del(c->update_job);
if (c->nocomp_delay_timer) ecore_timer_del(c->nocomp_delay_timer);
if (c->nocomp_override_timer) ecore_timer_del(c->nocomp_override_timer);
@ -894,8 +877,6 @@ _e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event
e_comp->saver = EINA_TRUE;
// XXX: this is not quite right - need to wait for signals from theme
// before freezing render animator
if (e_comp->render_animator)
ecore_animator_freeze(e_comp->render_animator);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
e_zone_fade_handle(zone, 1, 3.0);
@ -1406,9 +1387,6 @@ e_comp_new(void)
e_comp = E_OBJECT_ALLOC(E_Comp, E_COMP_TYPE, _e_comp_free);
if (!e_comp) return NULL;
e_comp->canvas = E_NEW(E_Comp_Canvas, 1);
e_comp->render_animator = ecore_animator_add(_e_comp_cb_animator, NULL);
ecore_animator_freeze(e_comp->render_animator);
return e_comp;
}
@ -1453,20 +1431,13 @@ e_comp_shutdown(void)
E_API void
e_comp_render_queue(void)
{
if (conf->lock_fps)
if (e_comp->update_job)
{
ecore_animator_thaw(e_comp->render_animator);
}
else
{
if (e_comp->update_job)
{
DBG("UPDATE JOB DEL...");
E_FREE_FUNC(e_comp->update_job, ecore_job_del);
}
DBG("UPDATE JOB ADD...");
e_comp->update_job = ecore_job_add(_e_comp_cb_job, e_comp);
DBG("UPDATE JOB DEL...");
E_FREE_FUNC(e_comp->update_job, ecore_job_del);
}
DBG("UPDATE JOB ADD...");
e_comp->update_job = ecore_job_add(_e_comp_cb_job, e_comp);
}
E_API void

View File

@ -42,7 +42,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
E_CONFIG_VAL(D, T, fps_show, UCHAR);
E_CONFIG_VAL(D, T, indirect, UCHAR);
E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
E_CONFIG_VAL(D, T, lock_fps, UCHAR);
// E_CONFIG_VAL(D, T, lock_fps, UCHAR);
E_CONFIG_VAL(D, T, grab, UCHAR);
E_CONFIG_VAL(D, T, vsync, UCHAR);
E_CONFIG_VAL(D, T, swap_mode, UCHAR);
@ -79,7 +79,7 @@ e_comp_cfdata_config_new(void)
cfg->fps_show = 0;
cfg->indirect = 0;
cfg->texture_from_pixmap = 1;
cfg->lock_fps = 0;
// cfg->lock_fps = 0;
cfg->grab = 0;
cfg->vsync = 1;
#ifdef ECORE_EVAS_GL_X11_OPT_SWAP_MODE

View File

@ -6,7 +6,6 @@ struct _E_Config_Dialog_Data
int indirect;
int texture_from_pixmap;
int smooth_windows;
int lock_fps;
int grab;
int vsync;
int swap_mode;
@ -104,7 +103,6 @@ _create_data(E_Config_Dialog *cfd EINA_UNUSED)
cfdata->indirect = conf->indirect;
cfdata->texture_from_pixmap = conf->texture_from_pixmap;
cfdata->smooth_windows = conf->smooth_windows;
cfdata->lock_fps = conf->lock_fps;
cfdata->grab = conf->grab;
cfdata->vsync = conf->vsync;
cfdata->swap_mode = conf->swap_mode;
@ -404,8 +402,7 @@ _advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
{
E_Comp_Config *conf = e_comp_config_get();
if ((cfdata->lock_fps != conf->lock_fps) ||
(cfdata->smooth_windows != conf->smooth_windows) ||
if ((cfdata->smooth_windows != conf->smooth_windows) ||
(cfdata->grab != conf->grab) ||
(cfdata->keep_unmapped != conf->keep_unmapped) ||
(cfdata->nocomp_fs != conf->nocomp_fs) ||
@ -425,7 +422,6 @@ _advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
{
if (conf->enable_advanced_features != cfdata->enable_advanced_features)
_advanced_features_changed(conf);
conf->lock_fps = cfdata->lock_fps;
conf->smooth_windows = cfdata->smooth_windows;
conf->grab = cfdata->grab;
conf->keep_unmapped = cfdata->keep_unmapped;
@ -558,7 +554,6 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
E_Comp_Config *conf = e_comp_config_get();
if (cfdata->match.toggle_changed ||
(cfdata->lock_fps != conf->lock_fps) ||
(cfdata->smooth_windows != conf->smooth_windows) ||
(cfdata->grab != conf->grab) ||
(cfdata->nofade != conf->nofade) ||
@ -576,7 +571,6 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
(!EINA_DBL_EQ(cfdata->first_draw_delay, conf->first_draw_delay))
)
{
conf->lock_fps = cfdata->lock_fps;
conf->smooth_windows = cfdata->smooth_windows;
conf->grab = cfdata->grab;
conf->nofade = cfdata->nofade;