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.
This commit is contained in:
Emmanuele Bassi 2008-12-11 15:39:28 +00:00
parent 99bcf731cb
commit 3f2c9fe6b3

View File

@ -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