forked from enlightenment/enlightenment
Revert "Revert "Revert "e_main_idler_freeze/thaw - disable - this causes no end of wierdnesses"""
This reverts commit 91b3f2e0e1
.
revert wars part 4: the blizzard blitz!
the main point of freezing idlers here was not, in fact, to optimize, but to block an infinite loop which pegged the cpu until screensaver ended. this solution should be less issue-prone for the one person who had issues with the previous fix.
This commit is contained in:
parent
a16f820f95
commit
a3fbcc339b
|
@ -273,8 +273,6 @@ typedef struct _E_Rect E_Rect;
|
|||
# include "e_includes.h"
|
||||
|
||||
EAPI double e_main_ts(const char *str);
|
||||
EINTERN void e_main_idler_freeze(void);
|
||||
EINTERN void e_main_idler_thaw(void);
|
||||
|
||||
struct _E_Rect
|
||||
{
|
||||
|
|
|
@ -315,7 +315,7 @@ _e_comp_client_update(E_Client *ec)
|
|||
e_comp_object_render_update_add(ec->frame);
|
||||
}
|
||||
}
|
||||
if (e_pixmap_size_get(ec->pixmap, &pw, &ph))
|
||||
if ((!ec->comp->saver) && e_pixmap_size_get(ec->pixmap, &pw, &ph))
|
||||
{
|
||||
//INF("PX DIRTY: PX(%dx%d) CLI(%dx%d)", pw, ph, ec->client.w, ec->client.h);
|
||||
e_pixmap_image_refresh(ec->pixmap);
|
||||
|
@ -816,7 +816,6 @@ _e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event
|
|||
c->saver = EINA_TRUE;
|
||||
if (c->render_animator)
|
||||
ecore_animator_freeze(c->render_animator);
|
||||
E_FREE_FUNC(c->update_job, ecore_job_del);
|
||||
EINA_LIST_FOREACH(c->zones, ll, zone)
|
||||
{
|
||||
e_comp_override_add(c);
|
||||
|
@ -840,13 +839,11 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even
|
|||
// fixme: use hash if compositors list > 4
|
||||
EINA_LIST_FOREACH(compositors, l, c)
|
||||
{
|
||||
E_Client *ec;
|
||||
if (!c->saver) continue;
|
||||
/* frozen in _e_comp_canvas_screensaver_active() */
|
||||
// e_main_idler_thaw();
|
||||
c->saver = EINA_FALSE;
|
||||
if (!c->nocomp)
|
||||
ecore_evas_manual_render_set(c->ee, EINA_FALSE);
|
||||
e_comp_render_queue(c);
|
||||
EINA_LIST_FOREACH(c->zones, ll, zone)
|
||||
{
|
||||
edje_object_signal_emit(zone->base, "e,state,screensaver,off", "e");
|
||||
|
@ -854,6 +851,9 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even
|
|||
e_zone_fade_handle(zone, 0, 0.5);
|
||||
e_comp_override_timed_pop(c);
|
||||
}
|
||||
E_CLIENT_FOREACH(c, ec)
|
||||
if (e_comp_object_damage_exists(ec->frame))
|
||||
e_comp_object_render_update_add(ec->frame);
|
||||
}
|
||||
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
|
@ -1387,8 +1387,6 @@ e_comp_render_queue(E_Comp *c)
|
|||
E_OBJECT_TYPE_CHECK(c, E_COMP_TYPE);
|
||||
if (!c) return;
|
||||
|
||||
if (c->saver) return;
|
||||
|
||||
if (conf->lock_fps)
|
||||
{
|
||||
ecore_animator_thaw(c->render_animator);
|
||||
|
|
|
@ -91,7 +91,6 @@ _e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const c
|
|||
{
|
||||
E_Comp *c;
|
||||
/* thawed in _e_comp_screensaver_off() */
|
||||
// e_main_idler_freeze();
|
||||
ecore_animator_frametime_set(10.0);
|
||||
c = e_comp_util_evas_object_comp_get(obj);
|
||||
if (!c->nocomp)
|
||||
|
|
|
@ -87,7 +87,6 @@ static Eina_Bool _e_main_cb_idle_after(void *data __UNUSED__);
|
|||
static Eina_Bool _e_main_cb_startup_fake_end(void *data __UNUSED__);
|
||||
|
||||
/* local variables */
|
||||
static Eina_Bool frozen = EINA_FALSE;
|
||||
static int idle_freeze = 0;
|
||||
static Eina_Bool really_know = EINA_FALSE;
|
||||
static Eina_Bool locked = EINA_FALSE;
|
||||
|
@ -1672,7 +1671,6 @@ _e_main_cb_idle_before(void *data __UNUSED__)
|
|||
e_client_idler_before();
|
||||
e_pointer_idler_before();
|
||||
edje_thaw();
|
||||
frozen = EINA_FALSE;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
|
@ -1682,7 +1680,6 @@ _e_main_cb_idle_after(void *data __UNUSED__)
|
|||
static int first_idle = 1;
|
||||
|
||||
edje_freeze();
|
||||
frozen = EINA_TRUE;
|
||||
|
||||
#ifdef E19_RELEASE_BUILD
|
||||
if (first_idle)
|
||||
|
@ -1717,24 +1714,3 @@ _e_main_cb_startup_fake_end(void *data __UNUSED__)
|
|||
e_init_hide();
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
e_main_idler_freeze(void)
|
||||
{
|
||||
if (idle_freeze++) return;
|
||||
E_FREE_FUNC(_idle_before, ecore_idle_enterer_del);
|
||||
E_FREE_FUNC(_idle_after, ecore_idle_enterer_del);
|
||||
if (!frozen) return;
|
||||
edje_thaw();
|
||||
frozen = EINA_FALSE;
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
e_main_idler_thaw(void)
|
||||
{
|
||||
if (!idle_freeze) return;
|
||||
if (--idle_freeze) return;
|
||||
|
||||
_idle_before = ecore_idle_enterer_before_add(_e_main_cb_idle_before, NULL);
|
||||
_idle_after = ecore_idle_enterer_add(_e_main_cb_idle_after, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue