From 3f2c9fe6b31af32ad643cce9154e17096eed432c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 11 Dec 2008 15:39:28 +0000 Subject: [PATCH] Set the IN_PAINT private flag When calling clutter_actor_paint() we should be setting the CLUTTER_ACTOR_IN_PAINT private flag. This allows signalling to each Actor subclass that we are effectively in the middle of a paint sequence. Actor subclasses can check for this private flag and act based on its presence - for instance to avoid recursion, or to detect performance degradation cases. --- clutter/clutter-actor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 424144436..b3567e8c9 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1453,6 +1453,9 @@ clutter_actor_paint (ClutterActor *self) } } + /* mark that we are in the paint process */ + CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IN_PAINT); + cogl_push_matrix(); _clutter_actor_apply_modelview_transform (self); @@ -1492,6 +1495,9 @@ clutter_actor_paint (ClutterActor *self) cogl_clip_unset(); cogl_pop_matrix(); + + /* paint sequence complete */ + CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IN_PAINT); } /* fixed point, unit based rotation setter, to be used by