clutter: Keep actors dirty if a redraw was queued up during paint()
In the right combination of circumstances, and given 2 actors (parent actor P with an offscreen effect and child actor C), we may have the following situation happening: - A redraw is queued on the actor C, actors C and P are marked as priv->is_dirty and priv->propagated_one_redraw. - During paint() handling we paint actor P, priv->propagated_one_redraw is turned off. - We recurse into child actor C, priv->propagated_one_redraw is turned off. - A new redraw is queued on actor C, actors C and P are marked as priv->is_dirty and priv->propagated_one_redraw. - The paint() method recurses back, actors C and P get priv->is_dirty disabled, priv->propagated_one_redraw remains set. - At this point queueing up more redraws on actor C will not propagate up, because actor C has priv->propagated_one_redraw set, but the parent actor P has priv->is_dirty unset, so the offscreen effect will not get CLUTTER_EFFECT_PAINT_ACTOR_DIRTY and will avoid repainting actor C. The end result is that actor C does not redraw again, despite requesting redraws. This situation eventually resolves itself through e.g. relayouts on actor P, but may take some time to happen. In order to fix this, consider actors that did get a further redraw request still dirty after paint(). Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2188 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2353>
This commit is contained in:
parent
ce7f606d48
commit
f820bb3506
@ -3840,8 +3840,10 @@ clutter_actor_paint (ClutterActor *self,
|
|||||||
clutter_paint_node_paint (root_node, paint_context);
|
clutter_paint_node_paint (root_node, paint_context);
|
||||||
|
|
||||||
/* If we make it here then the actor has run through a complete
|
/* If we make it here then the actor has run through a complete
|
||||||
paint run including all the effects so it's no longer dirty */
|
* paint run including all the effects so it's no longer dirty,
|
||||||
priv->is_dirty = FALSE;
|
* unless a new redraw was queued up.
|
||||||
|
*/
|
||||||
|
priv->is_dirty = priv->propagated_one_redraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user