effect: Allow any effect to override the paint volume

An Effect implementation might override the paint volume of the actor to
which it is applied to. The get_paint_volume() virtual function should
be added to the Effect class vtable so that any effect can get the
current paint volume and update it.

The clutter_actor_get_paint_volume() function becomes context aware, and
does the right thing if called from within a ClutterEffect pre_paint()
or post_paint() implementation, by allowing all effects in the chain up
to the caller to modify the paint volume.
This commit is contained in:
Emmanuele Bassi
2010-08-16 17:02:15 +01:00
committed by Robert Bragg
parent 94ce747f83
commit 25abdf09b7
4 changed files with 80 additions and 6 deletions

View File

@ -384,8 +384,10 @@ void _clutter_run_repaint_functions (void);
gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
void _clutter_effect_post_paint (ClutterEffect *effect);
gboolean _clutter_effect_pre_paint (ClutterEffect *effect);
void _clutter_effect_post_paint (ClutterEffect *effect);
void _clutter_effect_get_paint_volume (ClutterEffect *effect,
ClutterPaintVolume *volume);
void _clutter_constraint_update_allocation (ClutterConstraint *constraint,
ClutterActor *actor,