mutter/clutter
Emmanuele Bassi 678f99677f Use a single master "clock" to drive timelines
Currently, all timelines install a timeout inside the TimeoutPool
they share. Every time the main loop spins, all the timeouts are
updated. This, in turn, will usually lead to redraws being queued
on the stages.

This behaviour leads to the potential starvation of timelines and
to excessive redraws.

One lesson learned from the games developers is that the scenegraph
should be prepared in its entirety before the GL paint sequence is
initiated. This means making sure that every ::new-frame signal
handler is called before clutter_redraw() is invoked.

In order to do so a TimeoutPool is not enough: we need a master
clock. The clock will be responsible for advancing all the active
timelines created inside a scene, but only when the stage is
being redrawn.

The sequence is:

  + queue_redraw() is invoked on an actor and bubbles up
    to the stage

  + if no redraw() has already been scheduled, install an
    idle handler with a known priority

  + inside the idle handler:

    - advance the master clock, which will in turn advance
      every playing timeline by the amount of milliseconds
      elapsed since the last redraw; this will make every
      playing timeline emit the ::new-frame signal

    - queue a relayout

    - call the redraw() method of the backend

This way we trade multiple timeouts with a single frame source
that only runs if a timeline is playing and queues redraws on
the various stages.
2009-04-24 15:28:15 +01:00
..
cogl Unnecessary glColorMask on alpha drops performance 2009-04-24 15:26:32 +01:00
eglnative Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
eglx Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
fruity Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
glx Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
json [json] Avoid leaks on error code paths 2009-04-15 12:18:55 +01:00
osx
pango [cogl-pango-render] Fix returning to default color after a color attribute 2009-04-06 11:14:43 +01:00
sdl Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
win32 Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
x11 Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
clutter-actor.c Relinquish the focus when unmapped while owning it 2009-04-24 15:27:47 +01:00
clutter-actor.h Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
clutter-alpha.c [alpha] Sanitize easing equations 2009-04-23 11:35:10 +01:00
clutter-alpha.h
clutter-animatable.c
clutter-animatable.h
clutter-animation.c [animation] Do not connect to ::completed multiple times 2009-04-05 20:32:15 +01:00
clutter-animation.h [animation] Add the ::started signal 2009-04-03 14:19:20 +01:00
clutter-backend.c [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-backend.h [backend] Constify font options 2009-02-26 15:32:48 +00:00
clutter-behaviour-depth.c
clutter-behaviour-depth.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-ellipse.c [docs] Remove ClutterFixed from the documentation 2009-03-10 12:38:04 +00:00
clutter-behaviour-ellipse.h Move ClutterBehaviourEllipse to CoglFixed 2009-03-10 12:38:03 +00:00
clutter-behaviour-opacity.c
clutter-behaviour-opacity.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-path.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-behaviour-path.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-behaviour-rotate.c Move ClutterBehaviourRotate to CoglFixed 2009-03-10 12:38:03 +00:00
clutter-behaviour-rotate.h Move ClutterBehaviourRotate to CoglFixed 2009-03-10 12:38:03 +00:00
clutter-behaviour-scale.c Move BehaviourScale to CoglFixed 2009-03-10 12:38:03 +00:00
clutter-behaviour-scale.h Move BehaviourScale to CoglFixed 2009-03-10 12:38:03 +00:00
clutter-behaviour.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-behaviour.h
clutter-bezier.c
clutter-bezier.h
clutter-binding-pool.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-binding-pool.h
clutter-cairo-texture.c
clutter-cairo-texture.h
clutter-child-meta.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-child-meta.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-clone.c [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-clone.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-color.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-color.h Clean up of the ClutterColor API 2009-03-10 12:38:02 +00:00
clutter-container.c Add ClutterContainer::foreach_with_internals() 2009-04-24 15:25:08 +01:00
clutter-container.h Add ClutterContainer::foreach_with_internals() 2009-04-24 15:25:08 +01:00
clutter-debug.h Add debug annotations for the layout process 2009-04-15 17:25:50 +01:00
clutter-deprecated.h [shader] Remove deprecated set_uniform_1f() 2009-04-03 12:47:21 +01:00
clutter-enum-types.c.in 2007-12-25 Emmanuele Bassi <ebassi@openedhand.com> 2007-12-25 11:41:10 +00:00
clutter-enum-types.h.in
clutter-event.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-event.h Bug 1440 - Add clutter_get_current_event_time() 2009-02-14 11:38:16 +00:00
clutter-feature.c
clutter-feature.h
clutter-fixed.c [docs] Remove ClutterFixed from the documentation 2009-03-10 12:38:04 +00:00
clutter-fixed.h [fixed] Remove ClutterFixed API 2009-03-10 12:38:04 +00:00
clutter-frame-source.c Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-frame-source.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-group.c Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
clutter-group.h [group] avoid double evaluation of arguments in clutter_group_add 2009-04-08 18:19:46 +01:00
clutter-id-pool.c
clutter-id-pool.h
clutter-interval.c [interval] Update fixed-point handling 2009-03-10 12:38:03 +00:00
clutter-interval.h
clutter-json.h.in
clutter-keysyms-table.h
clutter-keysyms.h
clutter-list-model.c [list-model] Make ClutterListModel subclassable 2009-02-14 11:31:00 +00:00
clutter-list-model.h [list-model] Make ClutterListModel subclassable 2009-02-14 11:31:00 +00:00
clutter-main.c Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-main.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-marshal.list
clutter-master-clock.c Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-master-clock.h Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-media.c [media] Add sub-second resolution for the duration 2009-02-24 16:22:02 +00:00
clutter-media.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-model-private.h
clutter-model.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-model.h
clutter-path.c Prevent a possible zero division 2009-04-16 17:16:31 +01:00
clutter-path.h
clutter-private.h Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-rectangle.c
clutter-rectangle.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-score.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-score.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-script-parser.c
clutter-script-private.h
clutter-script.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-script.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-scriptable.c Intern the ClutterScriptable type name 2009-02-26 14:57:58 +00:00
clutter-scriptable.h
clutter-shader-types.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-shader-types.h Do not use GL types in Clutter headers 2009-02-20 11:47:14 +00:00
clutter-shader.c [shader] Remove deprecated set_uniform_1f() 2009-04-03 12:47:21 +01:00
clutter-shader.h [shader] Remove deprecated set_uniform_1f() 2009-04-03 12:47:21 +01:00
clutter-stage-manager.c Add gobject-introspection annotations 2009-02-20 12:09:07 +00:00
clutter-stage-manager.h
clutter-stage-window.c
clutter-stage-window.h
clutter-stage.c Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-stage.h Allow passing the pick mode to get_actor_at_pos() 2009-04-24 15:25:58 +01:00
clutter-text.c [text] Avoid a Pango warning with empty markup 2009-04-21 14:08:55 +01:00
clutter-text.h [clutter-text] Add a separate property for the selection color 2009-04-06 15:22:31 +01:00
clutter-texture.c Enforce invariants on mapped, realized, visibility states 2009-04-24 15:27:19 +01:00
clutter-texture.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-timeline.c Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00
clutter-timeline.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-timeout-interval.c Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-timeout-interval.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-timeout-pool.c [docs] Fix naming of the interval parameter 2009-03-16 16:56:51 +00:00
clutter-timeout-pool.h Count timeline frames using the FPS instead of an integer interval 2009-03-16 15:40:18 +00:00
clutter-types.h [docs] Update API reference 2009-03-10 12:38:04 +00:00
clutter-units.c Remove usage of the grave accent as quotation mark 2009-03-17 14:13:31 +00:00
clutter-units.h [docs] Bring down the undocumented symbols to 2% 2009-03-16 15:00:55 +00:00
clutter-util.c
clutter-util.h
clutter-version.h.in
clutter.h Add more deprecation notices 2009-03-13 14:29:27 +00:00
Makefile.am Use a single master "clock" to drive timelines 2009-04-24 15:28:15 +01:00