discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=1efb80bddbb00bbed13c8c85e20a955d9157cf40

commit 1efb80bddbb00bbed13c8c85e20a955d9157cf40
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jan 28 20:49:27 2014 -0500

    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 c7e4acb..230524a 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 c69136c..c8eac04 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);
 }
 
 ////////////////////////////////////

-- 


Reply via email to