[actor] Relax some of the invariants checks
When destroying a top-level actor we can actually relax the verification of the map state, since it might be fully asynchronous and we might not re-enter inside the mainloop in time to receive the unmap notification.
This commit is contained in:
parent
9f3927c460
commit
91126558d3
@ -558,8 +558,11 @@ clutter_actor_verify_map_state (ClutterActor *self)
|
|||||||
{
|
{
|
||||||
if (CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL)
|
if (CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL)
|
||||||
{
|
{
|
||||||
if (!CLUTTER_ACTOR_IS_VISIBLE (self))
|
if (!CLUTTER_ACTOR_IS_VISIBLE (self) &&
|
||||||
g_warning ("Toplevel actor is mapped but not visible");
|
!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IN_DESTRUCTION))
|
||||||
|
{
|
||||||
|
g_warning ("Toplevel actor is mapped but not visible");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -690,7 +693,9 @@ clutter_actor_update_map_state (ClutterActor *self,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_MAPPED (self) && !CLUTTER_ACTOR_IS_VISIBLE (self))
|
if (CLUTTER_ACTOR_IS_MAPPED (self) &&
|
||||||
|
!CLUTTER_ACTOR_IS_VISIBLE (self) &&
|
||||||
|
!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IN_DESTRUCTION))
|
||||||
{
|
{
|
||||||
g_warning ("Clutter toplevel is not visible, but is "
|
g_warning ("Clutter toplevel is not visible, but is "
|
||||||
"somehow still mapped");
|
"somehow still mapped");
|
||||||
@ -1139,7 +1144,7 @@ clutter_actor_realize (ClutterActor *self)
|
|||||||
/* To be realized, our parent actors must be realized first.
|
/* To be realized, our parent actors must be realized first.
|
||||||
* This will only succeed if we're inside a toplevel.
|
* This will only succeed if we're inside a toplevel.
|
||||||
*/
|
*/
|
||||||
if (self->priv->parent_actor)
|
if (self->priv->parent_actor != NULL)
|
||||||
clutter_actor_realize (self->priv->parent_actor);
|
clutter_actor_realize (self->priv->parent_actor);
|
||||||
|
|
||||||
if (CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL)
|
if (CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL)
|
||||||
@ -2820,9 +2825,13 @@ clutter_actor_dispose (GObject *object)
|
|||||||
|
|
||||||
/* parent should be gone */
|
/* parent should be gone */
|
||||||
g_assert (priv->parent_actor == NULL);
|
g_assert (priv->parent_actor == NULL);
|
||||||
/* can't be mapped or realized with no parent */
|
|
||||||
g_assert (!CLUTTER_ACTOR_IS_MAPPED (self));
|
if (!(CLUTTER_PRIVATE_FLAGS (self) & CLUTTER_ACTOR_IS_TOPLEVEL))
|
||||||
g_assert (!CLUTTER_ACTOR_IS_REALIZED (self));
|
{
|
||||||
|
/* can't be mapped or realized with no parent */
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_MAPPED (self));
|
||||||
|
g_assert (!CLUTTER_ACTOR_IS_REALIZED (self));
|
||||||
|
}
|
||||||
|
|
||||||
destroy_shader_data (self);
|
destroy_shader_data (self);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user