mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
clutter-actor: Keep is_dirty unchanged for culled actors
In a multi-monitor setup there is a separate paint run for each monitor. If an actor doesn't intersect the first monitor painted then it is culled out for that monitor to save time. Unfortunately this would mean `clutter_actor_paint` was setting `is_dirty = FALSE` before the actor had yet been painted on any monitor. This meant that effects like `ClutterOffscreenEffect` were not receiving the flag `CLUTTER_EFFECT_PAINT_ACTOR_DIRTY` when they should have, and so would rightfully think they don't need to do a full internal invalidation. So `ClutterOffscreenEffect`, and probably other effects, did not repaint correctly unless on the first monitor in the list. The fix is to simply avoid setting `is_dirty = FALSE` on those paint runs where the actor has been culled out (`clutter_actor_continue_paint` wasn't called). It is only safe to clear the flag after `clutter_actor_continue_paint` has been called at least once per stage paint. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1049 https://gitlab.gnome.org/GNOME/mutter/merge_requests/511
This commit is contained in:
parent
28e0a7bfb5
commit
ee507d9ab2
@ -4007,12 +4007,12 @@ clutter_actor_paint (ClutterActor *self)
|
|||||||
pick_mode == CLUTTER_PICK_NONE))
|
pick_mode == CLUTTER_PICK_NONE))
|
||||||
_clutter_actor_draw_paint_volume (self);
|
_clutter_actor_draw_paint_volume (self);
|
||||||
|
|
||||||
done:
|
|
||||||
/* 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 */
|
||||||
if (pick_mode == CLUTTER_PICK_NONE)
|
if (pick_mode == CLUTTER_PICK_NONE)
|
||||||
priv->is_dirty = FALSE;
|
priv->is_dirty = FALSE;
|
||||||
|
|
||||||
|
done:
|
||||||
if (clip_set)
|
if (clip_set)
|
||||||
{
|
{
|
||||||
CoglFramebuffer *fb = _clutter_stage_get_active_framebuffer (stage);
|
CoglFramebuffer *fb = _clutter_stage_get_active_framebuffer (stage);
|
||||||
|
Loading…
Reference in New Issue
Block a user