Skip to content

clutter: Keep actors dirty if a redraw was queued up during paint()

Carlos Garnacho requested to merge wip/carlosg/queue-redraw-fix into main

From the main commit:

    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: #2188 (closed)

Merge request reports