mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
clutter/effect: Move ClutterEffect creation to ClutterActor
As so paint node creation is centralized in a single function. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
This commit is contained in:
parent
46c68f368f
commit
431bde921c
@ -3895,6 +3895,7 @@ clutter_actor_continue_paint (ClutterActor *self,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
g_autoptr (ClutterPaintNode) effect_node = NULL;
|
||||||
ClutterEffect *old_current_effect;
|
ClutterEffect *old_current_effect;
|
||||||
ClutterEffectPaintFlags run_flags = 0;
|
ClutterEffectPaintFlags run_flags = 0;
|
||||||
|
|
||||||
@ -3923,7 +3924,14 @@ clutter_actor_continue_paint (ClutterActor *self,
|
|||||||
run_flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY)
|
run_flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY)
|
||||||
run_flags |= CLUTTER_EFFECT_PAINT_BYPASS_EFFECT;
|
run_flags |= CLUTTER_EFFECT_PAINT_BYPASS_EFFECT;
|
||||||
|
|
||||||
_clutter_effect_paint (priv->current_effect, paint_context, run_flags);
|
effect_node = clutter_effect_node_new (priv->current_effect);
|
||||||
|
|
||||||
|
_clutter_effect_paint (priv->current_effect,
|
||||||
|
effect_node,
|
||||||
|
paint_context,
|
||||||
|
run_flags);
|
||||||
|
|
||||||
|
clutter_paint_node_paint (effect_node, paint_context);
|
||||||
|
|
||||||
priv->current_effect = old_current_effect;
|
priv->current_effect = old_current_effect;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ gboolean _clutter_effect_modify_paint_volume (ClutterEffect
|
|||||||
ClutterPaintVolume *volume);
|
ClutterPaintVolume *volume);
|
||||||
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
|
||||||
void _clutter_effect_paint (ClutterEffect *effect,
|
void _clutter_effect_paint (ClutterEffect *effect,
|
||||||
|
ClutterPaintNode *node,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
ClutterEffectPaintFlags flags);
|
ClutterEffectPaintFlags flags);
|
||||||
void _clutter_effect_pick (ClutterEffect *effect,
|
void _clutter_effect_pick (ClutterEffect *effect,
|
||||||
|
@ -285,22 +285,16 @@ clutter_effect_init (ClutterEffect *self)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_clutter_effect_paint (ClutterEffect *effect,
|
_clutter_effect_paint (ClutterEffect *effect,
|
||||||
|
ClutterPaintNode *node,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
ClutterEffectPaintFlags flags)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
ClutterPaintNode *node;
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
|
||||||
|
|
||||||
node = clutter_effect_node_new (effect);
|
|
||||||
|
|
||||||
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect,
|
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect,
|
||||||
node,
|
node,
|
||||||
paint_context,
|
paint_context,
|
||||||
flags);
|
flags);
|
||||||
|
|
||||||
clutter_paint_node_paint (node, paint_context);
|
|
||||||
clutter_paint_node_unref (node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user