Skip to content
  • Olivier Fourdan's avatar
    xwayland/eglstream: Do not always increment pixmap refcnt on commit · d85bfa6a
    Olivier Fourdan authored
    
    
    Currently, the EGLstream backend would increment the pixmap refcount for
    each commit, and decrease that refcount on the wl_buffer release
    callback.
    
    But that's relying on the compositor sending us a release callback for
    each commit, otherwise the pixmap refcount will keep increasing and the
    pixmap will be leaked.
    
    So instead, increment the refcount on the pixmap only when we have not
    received a release notification for the wl_buffer, to avoid increasing
    the pixmap refcount more than once without a corresponding release
    event.
    
    This way, if the pixmap is still in use when released on the X11 side,
    the EGL stream will be kept until the compositor releases it.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Suggested-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
    Reviewed-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
    d85bfa6a