diff options
author | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2019-03-28 16:50:21 +0800 |
---|---|---|
committer | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2019-03-28 17:42:01 +0800 |
commit | ee507d9ab2b2f277447976c3f5ddc55375fef1eb (patch) | |
tree | 6eb1e98c22a0ffd514b63323c9a19741a78995b8 | |
parent | 28e0a7bfb57c488cb74806e0df6c2f4a3fd91653 (diff) | |
download | mutter-ee507d9ab2b2f277447976c3f5ddc55375fef1eb.tar.gz |
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
-rw-r--r-- | clutter/clutter/clutter-actor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index fd38338c7..803f76aae 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -4007,12 +4007,12 @@ clutter_actor_paint (ClutterActor *self) pick_mode == CLUTTER_PICK_NONE)) _clutter_actor_draw_paint_volume (self); -done: /* 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 */ if (pick_mode == CLUTTER_PICK_NONE) priv->is_dirty = FALSE; +done: if (clip_set) { CoglFramebuffer *fb = _clutter_stage_get_active_framebuffer (stage); |