[clone] Allow painting hidden source actors
With the introduction of the map/unmap flags and the split of the visible state from the mapped state we require that every part of a scene graph branch is mapped in order to be painted. This breaks the ability of a ClutterClone to paint an hidden source actor. In order to fix this we need to introduce an override flag, similar in spirit to the current modelview and paint opacity overrides that Clone is already using. The override flag, when set, will force a temporary map on a Clone source (and its children).
This commit is contained in:
@ -122,6 +122,7 @@ clutter_clone_paint (ClutterActor *self)
|
||||
ClutterClonePrivate *priv = clone->priv;
|
||||
ClutterGeometry geom, clone_geom;
|
||||
gfloat x_scale, y_scale;
|
||||
gboolean was_unmapped = FALSE;
|
||||
|
||||
if (G_UNLIKELY (priv->clone_source == NULL))
|
||||
return;
|
||||
@ -155,8 +156,17 @@ clutter_clone_paint (ClutterActor *self)
|
||||
_clutter_actor_set_opacity_parent (priv->clone_source, self);
|
||||
_clutter_actor_set_enable_model_view_transform (priv->clone_source, FALSE);
|
||||
|
||||
if (!CLUTTER_ACTOR_IS_MAPPED (priv->clone_source))
|
||||
{
|
||||
_clutter_actor_set_enable_paint_unmapped (priv->clone_source, TRUE);
|
||||
was_unmapped = TRUE;
|
||||
}
|
||||
|
||||
clutter_actor_paint (priv->clone_source);
|
||||
|
||||
if (was_unmapped)
|
||||
_clutter_actor_set_enable_paint_unmapped (priv->clone_source, FALSE);
|
||||
|
||||
_clutter_actor_set_enable_model_view_transform (priv->clone_source, TRUE);
|
||||
_clutter_actor_set_opacity_parent (priv->clone_source, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user