[group] Implement pick
Currently, picking in ClutterGroup pollutes the CLUTTER_DEBUG=paint logs since it just calls the paint function. Reimplementing the pick doesn't make us lose anything -- it might even be slightly faster since we don't have to do a (typed) cast and a class dereference.
This commit is contained in:
parent
081813fd61
commit
ab9c7671f5
@ -96,8 +96,7 @@ clutter_group_paint (ClutterActor *actor)
|
|||||||
|
|
||||||
g_assert (child != NULL);
|
g_assert (child != NULL);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (child))
|
clutter_actor_paint (child);
|
||||||
clutter_actor_paint (child);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave '%s'",
|
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave '%s'",
|
||||||
@ -109,14 +108,22 @@ static void
|
|||||||
clutter_group_pick (ClutterActor *actor,
|
clutter_group_pick (ClutterActor *actor,
|
||||||
const ClutterColor *color)
|
const ClutterColor *color)
|
||||||
{
|
{
|
||||||
|
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
|
||||||
|
GList *child_item;
|
||||||
|
|
||||||
/* Chain up so we get a bounding box pained (if we are reactive) */
|
/* Chain up so we get a bounding box pained (if we are reactive) */
|
||||||
CLUTTER_ACTOR_CLASS (clutter_group_parent_class)->pick (actor, color);
|
CLUTTER_ACTOR_CLASS (clutter_group_parent_class)->pick (actor, color);
|
||||||
|
|
||||||
/* Just forward to the paint call which in turn will trigger
|
for (child_item = priv->children;
|
||||||
* the child actors also getting 'picked'.
|
child_item != NULL;
|
||||||
*/
|
child_item = child_item->next)
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (actor))
|
{
|
||||||
clutter_group_paint (actor);
|
ClutterActor *child = child_item->data;
|
||||||
|
|
||||||
|
g_assert (child != NULL);
|
||||||
|
|
||||||
|
clutter_actor_paint (child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user