From 1efb80bddbb00bbed13c8c85e20a955d9157cf40 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 28 Jan 2014 20:49:27 -0500 Subject: [PATCH] set manual render and increase ecore frametime during screensaver --- src/bin/e_comp.c | 8 ++++++++ src/bin/e_comp_canvas.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index c7e4acbe0..230524aee 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -33,6 +33,8 @@ static E_Config_DD *conf_match_edd = NULL; static Ecore_Timer *action_timeout = NULL; static Eina_Bool gl_avail = EINA_FALSE; +static double ecore_frametime = 0; + static int _e_comp_log_dom = -1; EAPI int E_EVENT_COMPOSITOR_RESIZE = -1; @@ -806,6 +808,7 @@ _e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event E_Zone *zone; E_Comp *c; + ecore_frametime = ecore_animator_frametime_get(); // fixme: use hash if compositors list > 4 EINA_LIST_FOREACH(compositors, l, c) { @@ -833,6 +836,7 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even E_Zone *zone; E_Comp *c; + ecore_animator_frametime_set(ecore_frametime); // fixme: use hash if compositors list > 4 EINA_LIST_FOREACH(compositors, l, c) { @@ -840,6 +844,8 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even /* 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) { @@ -1038,6 +1044,8 @@ e_comp_init(void) _e_comp_log_dom = eina_log_domain_register("e_comp", EINA_COLOR_YELLOW); eina_log_domain_level_set("e_comp", EINA_LOG_LEVEL_INFO); + ecore_frametime = ecore_animator_frametime_get(); + E_EVENT_COMPOSITOR_RESIZE = ecore_event_type_new(); E_EVENT_COMP_OBJECT_ADD = ecore_event_type_new(); diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index c69136c74..c8eac04cb 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -87,10 +87,15 @@ _e_comp_canvas_cb_mouse_wheel(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj E //////////////////////////////////// static void -_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) +_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) { + 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) + ecore_evas_manual_render_set(c->ee, EINA_TRUE); } ////////////////////////////////////