On Tue, 28 Jun 2011 14:38:05 +0200 (CEST) Vincent Torri <vto...@univ-evry.fr>
said:

throttle sleep always runs after all idle enterers are done. its also a single
point so one "subsystem" can throttle up while one throttles down, thus both
adjusting the sleep time up and down to the "right level" in the end.

> what's he differences between idle_enterer and throttle ?
> 
> 
> Vincent
> 
> On Tue, 28 Jun 2011, Enlightenment SVN wrote:
> 
> > Log:
> > add ecore_throttle
> >
> >
> >
> > Author:       raster
> > Date:         2011-06-28 05:34:52 -0700 (Tue, 28 Jun 2011)
> > New Revision: 60756
> > Trac:         http://trac.enlightenment.org/e/changeset/60756
> >
> > Added:
> >  trunk/ecore/src/lib/ecore/ecore_throttle.c
> > Modified:
> >  trunk/ecore/ChangeLog trunk/ecore/src/lib/ecore/Ecore.h
> > trunk/ecore/src/lib/ecore/Makefile.am
> > trunk/ecore/src/lib/ecore/ecore_main.c
> > trunk/ecore/src/lib/ecore/ecore_private.h
> >
> > Modified: trunk/ecore/ChangeLog
> > ===================================================================
> > --- trunk/ecore/ChangeLog   2011-06-28 11:31:16 UTC (rev 60755)
> > +++ trunk/ecore/ChangeLog   2011-06-28 12:34:52 UTC (rev 60756)
> > @@ -245,3 +245,10 @@
> >         * New function: ecore_con_ssl_server_verify_basic for only verifying
> >             certificates against a server's Common Name (CN) or its
> >             Subject Alternative Name (if available)
> > +
> > +2011-06-28  Carsten Haitzler (The Rasterman)
> > +
> > +        * Add ecore_throttle mechanism to voluntarily do powersaving to
> > +        avoid wakeups and excess animation etc. when in the background
> > +        or another "powersave" state.
> > +
> >
> > Modified: trunk/ecore/src/lib/ecore/Ecore.h
> > ===================================================================
> > --- trunk/ecore/src/lib/ecore/Ecore.h       2011-06-28 11:31:16 UTC (rev
> > 60755) +++ trunk/ecore/src/lib/ecore/Ecore.h        2011-06-28 12:34:52 UTC
> > (rev 60756) @@ -887,6 +887,24 @@
> >    * @}
> >    */
> >
> > +  /**
> > +   * @defgroup Ecore_Throttle_Group Ecore Throttle functions
> > +   *
> > +   * @{
> > +   */
> > +
> > +   EAPI void       ecore_throttle_adjust(double amount );
> > +   EAPI double     ecore_throttle_get(void);
> > +
> > +
> > +  /**
> > +   * @}
> > +   */
> > +
> > +  /**
> > +   * @}
> > +   */
> > +
> > #ifdef __cplusplus
> > }
> > #endif
> >
> > Modified: trunk/ecore/src/lib/ecore/Makefile.am
> > ===================================================================
> > --- trunk/ecore/src/lib/ecore/Makefile.am   2011-06-28 11:31:16 UTC
> > (rev 60755) +++ trunk/ecore/src/lib/ecore/Makefile.am       2011-06-28
> > 12:34:52 UTC (rev 60756) @@ -25,7 +25,8 @@
> > ecore_time.c \
> > ecore_timer.c \
> > ecore_thread.c \
> > -ecore_glib.c
> > +ecore_glib.c \
> > +ecore_throttle.c
> >
> > if ECORE_HAVE_WIN32
> >
> >
> > Modified: trunk/ecore/src/lib/ecore/ecore_main.c
> > ===================================================================
> > --- trunk/ecore/src/lib/ecore/ecore_main.c  2011-06-28 11:31:16 UTC
> > (rev 60755) +++ trunk/ecore/src/lib/ecore/ecore_main.c      2011-06-28
> > 12:34:52 UTC (rev 60756) @@ -446,7 +446,11 @@
> >          _ecore_timer_cleanup();
> >
> >          /* when idling, busy loop checking the fds only */
> > -         if (!ecore_idling) _ecore_idle_enterer_call();
> > +         if (!ecore_idling)
> > +           {
> > +              _ecore_idle_enterer_call();
> > +              _ecore_throttle();
> > +           }
> >      }
> >
> >    /* don't check fds if somebody quit */
> > @@ -1443,13 +1447,18 @@
> >    if (_ecore_event_exist())
> >      {
> >         _ecore_idle_enterer_call();
> > +        _ecore_throttle();
> >         have_event = 1;
> >         _ecore_main_select(0.0);
> >         _ecore_timer_enable_new();
> >         goto process_events;
> >      }
> >    /* call idle enterers ... */
> > -   if (!once_only) _ecore_idle_enterer_call();
> > +   if (!once_only)
> > +     {
> > +        _ecore_idle_enterer_call();
> > +        _ecore_throttle();
> > +     }
> >    else
> >      {
> >         have_event = have_signal = 0;
> > @@ -1478,6 +1487,7 @@
> >    if (once_only)
> >      {
> >         _ecore_idle_enterer_call();
> > +        _ecore_throttle();
> >         in_main_loop--;
> >         _ecore_timer_enable_new();
> >         return;
> > @@ -1568,7 +1578,11 @@
> >    _ecore_event_call();
> >    _ecore_main_fd_handlers_cleanup();
> >
> > -   if (once_only) _ecore_idle_enterer_call();
> > +   if (once_only)
> > +     {
> > +        _ecore_idle_enterer_call();
> > +        _ecore_throttle();
> > +     }
> >    in_main_loop--;
> > }
> > #endif
> >
> > Modified: trunk/ecore/src/lib/ecore/ecore_private.h
> > ===================================================================
> > --- trunk/ecore/src/lib/ecore/ecore_private.h       2011-06-28 11:31:16
> > UTC (rev 60755) +++ trunk/ecore/src/lib/ecore/ecore_private.h
> > 2011-06-28 12:34:52 UTC (rev 60756) @@ -195,6 +195,8 @@
> > void _ecore_main_loop_init(void);
> > void _ecore_main_loop_shutdown(void);
> >
> > +void _ecore_throttle(void);
> > +
> > extern int    _ecore_fps_debug;
> > extern double _ecore_time_loop_time;
> > extern Eina_Bool _ecore_glib_always_integrate;
> >
> >
> > ------------------------------------------------------------------------------
> > All of the data generated in your IT infrastructure is seriously valuable.
> > Why? It contains a definitive record of application performance, security
> > threats, fraudulent activity, and more. Splunk takes this data and makes
> > sense of it. IT sense. And common sense.
> > http://p.sf.net/sfu/splunk-d2d-c2
> > _______________________________________________
> > enlightenment-svn mailing list
> > enlightenment-...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> >
> >
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and makes 
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to