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:

committed by
Robert Bragg

parent
94ce747f83
commit
25abdf09b7
@ -72,16 +72,21 @@ struct _ClutterEffectClass
|
||||
ClutterActorMetaClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||
void (* post_paint) (ClutterEffect *effect);
|
||||
gboolean (* pre_paint) (ClutterEffect *effect);
|
||||
void (* post_paint) (ClutterEffect *effect);
|
||||
|
||||
void (* get_paint_volume) (ClutterEffect *effect,
|
||||
ClutterPaintVolume *volume);
|
||||
|
||||
/*< private >*/
|
||||
void (* _clutter_effect0) (void);
|
||||
void (* _clutter_effect1) (void);
|
||||
void (* _clutter_effect2) (void);
|
||||
void (* _clutter_effect3) (void);
|
||||
void (* _clutter_effect4) (void);
|
||||
void (* _clutter_effect5) (void);
|
||||
void (* _clutter_effect6) (void);
|
||||
void (* _clutter_effect7) (void);
|
||||
};
|
||||
|
||||
GType clutter_effect_get_type (void) G_GNUC_CONST;
|
||||
|
Reference in New Issue
Block a user