mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
c3aa4d24bf
This adds a new virtual to ClutterEffect which is intended to be a more flexible replacement for the pre and post_paint functions. The implementation of a run virtual would look something like this: void effect_run (ClutterEffect *effect, ClutterEffectRunFlags flags) { /* Set up state */ /* ... */ /* Chain to the next item in the paint sequence */ clutter_actor_continue_paint (priv->actor); /* Clean up state */ /* ... */ } ClutterActor now just calls this virtual instead of the pre_paint and post_paint functions. It keeps track of the next effect in the list so that it knows what to do when clutter_actor_continue_paint is called. clutter_actor_continue_paint is a new function added just for implementing effects. The default implementation of the run virtual just calls pre_paint and post_paint so that existing effects will continue to work. An effect is allowed to conditionally skip calling clutter_actor_continue_paint(). This is useful to implement effects that cache the image of an actor. The flags parameter can be used to determine if the actor is dirty since the last paint. ClutterActor sets this flag whenever propagated_one_redraw is TRUE which means that a redraw for this actor or one of its children was queued. |
||
---|---|---|
.. | ||
cally | ||
clutter | ||
cogl-2.0 | ||
ChangeLog | ||
Makefile.am |