Skip to content
  • Daniel Stone's avatar
    desktop-shell: Reuse curtains for fades · 15a55305
    Daniel Stone authored
    
    
    Use the common infrastructure we have, rather than open-coding again.
    
    In changing to the common weston_curtain infrastructure which was
    introduced in a previous commit, there are two small functional
    derivations.
    
    After adding the view to a layer, we explicitly call
    weston_view_geometry_dirty(). This is believed to have no functional
    impact, as weston_views have their geometry-dirty flag set when they are
    created.
    
    weston_surface_damage() is also called to ensure that the surface is
    scheduled for a repaint. As there is currently no good common mechanic
    in the common code to ensure that output repaint will occur, due to the
    damage propagating outwards from the weston_surface, we are forced to
    call this to predictably ensure that the output will be repainted after
    we have made this change to the scene graph which should result in the
    user observing the new content being repainted.
    
    It is possible that these changes are not strictly required in order for
    the correct behaviour to occur. However, it is felt that explicitly
    adding these calls is perhaps the least fragile way to ensure that the
    behaviour continues to be correct and breakage is not observed,
    especially with both view mapping and surface damage identified as areas
    for future work which could be beneficial to Weston. If it is felt that
    these calls can be removed, then this is certainly possible at a later
    stage.
    
    Lastly, there are many users within desktop-shell of the common pattern
    of creating a weston_curtain and inserting it into the scene graph to be
    painted. These users have been an area of both theoretical concern and
    real-life observed fragility and breakage recently. By making each user
    follow a common and predictable pattern of usage, each user is no longer
    its own special case. This should make it easier to make the
    desktop-shell codebase more robust, not only simplifying the codebase,
    but improving observed behaviour.
    
    In doing this, it is hoped that future structural and interface changes
    become easier to make, allowing us to improve some of the more difficult
    corners of the libweston API.
    
    Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
    15a55305
Loading