Skip to content
  • Ville Syrjälä's avatar
    Revert "composite: Convert compWindowUpdate to use TraverseTree" · a5dc3531
    Ville Syrjälä authored and Keith Packard's avatar Keith Packard committed
    TraverseTree visits the parent before the children. When performing
    the automatic redirection updates, the children must be visited before
    the parent.
    
    If there are automatically redirected windows on multiple levels of the
    tree, updating the parents before the children would cause the parent
    updates to use stale data for areas covered by the children. Also
    updating the damaged children would re-damage the parent, which would
    cause additional walks over the tree.
    
    In the worst case with an unbroken chain of automatically redirected
    subwindows, all of which are damaged, only the leaf window would be
    properly updated on the first round. Then it's parent would be properly
    updated on the second round, and so on. And on every round all of the
    ancestor windows would be updated as well, but with stale data.
    So with N damaged windows you would end up with (N^2+N)/2 updates,
    instead of the expected N.
    
    This reverts commit 648c8871
    
    .
    
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@nokia.com>
    Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
    Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    a5dc3531