Skip to content
  • Jonas Ådahl's avatar
    MetaWaylandSurface: Keep an extra buffer use count for role-less surfaces · f44238a7
    Jonas Ådahl authored
    Whether a surface needs to keep the committed wl_buffer un-released
    depends on what role the surface gets assigned to. For example a cursor
    role may need an unreleased shm buffer in order to create a hw cursor from
    it.
    
    In order to support this, keep a separate reference and use count to
    the buffer on behalf of the in the future assigned role, and release
    those references after the surface was assigned a role. A role that
    needs its own references and use counts, must in its assign function
    make sure to add those.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762828
    f44238a7