[mutter/gbsneto/offscreen-paint-node: 8/8] clutter/effect: Move ClutterEffect creation to ClutterActor
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/offscreen-paint-node: 8/8] clutter/effect: Move ClutterEffect creation to ClutterActor
- Date: Mon, 6 Jul 2020 14:07:01 +0000 (UTC)
commit edf8a1e399d93992841a774bb34587e8bcddd65e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Jul 5 19:17:09 2020 -0300
clutter/effect: Move ClutterEffect creation to ClutterActor
As so paint node creation is centralized in a single function.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355
clutter/clutter/clutter-actor.c | 10 +++++++++-
clutter/clutter/clutter-effect-private.h | 1 +
clutter/clutter/clutter-effect.c | 8 +-------
3 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 217308a1d7..1090cac011 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3958,6 +3958,7 @@ clutter_actor_continue_paint (ClutterActor *self,
}
else
{
+ g_autoptr (ClutterPaintNode) effect_node = NULL;
ClutterEffect *old_current_effect;
ClutterEffectPaintFlags run_flags = 0;
@@ -3986,7 +3987,14 @@ clutter_actor_continue_paint (ClutterActor *self,
run_flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY)
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;
}
diff --git a/clutter/clutter/clutter-effect-private.h b/clutter/clutter/clutter-effect-private.h
index ec2e82ba46..85a32552f0 100644
--- a/clutter/clutter/clutter-effect-private.h
+++ b/clutter/clutter/clutter-effect-private.h
@@ -9,6 +9,7 @@ gboolean _clutter_effect_modify_paint_volume (ClutterEffect
ClutterPaintVolume *volume);
gboolean _clutter_effect_has_custom_paint_volume (ClutterEffect *effect);
void _clutter_effect_paint (ClutterEffect *effect,
+ ClutterPaintNode *node,
ClutterPaintContext *paint_context,
ClutterEffectPaintFlags flags);
void _clutter_effect_pick (ClutterEffect *effect,
diff --git a/clutter/clutter/clutter-effect.c b/clutter/clutter/clutter-effect.c
index 9ff0dcd1fb..94771b2df5 100644
--- a/clutter/clutter/clutter-effect.c
+++ b/clutter/clutter/clutter-effect.c
@@ -285,22 +285,16 @@ clutter_effect_init (ClutterEffect *self)
void
_clutter_effect_paint (ClutterEffect *effect,
+ ClutterPaintNode *node,
ClutterPaintContext *paint_context,
ClutterEffectPaintFlags flags)
{
- ClutterPaintNode *node;
-
g_return_if_fail (CLUTTER_IS_EFFECT (effect));
- node = clutter_effect_node_new (effect);
-
CLUTTER_EFFECT_GET_CLASS (effect)->paint (effect,
node,
paint_context,
flags);
-
- clutter_paint_node_paint (node, paint_context);
- clutter_paint_node_unref (node);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]