Skip to content
  • Alexandros Frantzis's avatar
    libweston: Support zwp_surface_synchronization_v1.get_release · 67629674
    Alexandros Frantzis authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Implement the get_release request of the zwp_surface_synchronization_v1
    interface.
    
    This commit implements the zwp_buffer_release_v1 interface. It supports
    the zwp_buffer_release_v1.fenced_release event for surfaces rendered by
    the GL renderer, and the zwp_buffer_release_v1.immediate_release event
    for other cases.
    
    Note that the immediate_release event is safe to be used for surface
    buffers used as planes in the DRM backend, since the backend releases
    them only after the next page flip that doesn't use the buffers has
    finished.
    
    Changes in v7:
      - Remove "partial" from commit title and description.
      - Fix inverted check when clearing used_in_output_repaint flag.
    
    Changes in v5:
      - Use the new, generic explicit sync server error reporting function.
      - Introduce and use weston_buffer_release_move.
      - Introduce internally and use weston_buffer_release_destroy.
    
    Changes in v4:
      - Support the zwp_buffer_release_v1.fenced_release event.
      - Support release fences in the GL renderer.
      - Assert that pending state buffer_release is always NULL after a
        commit.
      - Simplify weston_buffer_release_reference.
      - Move removal of destroy listener before resource destruction to
        avoid concerns about use-after-free in
        weston_buffer_release_reference
      - Rename weston_buffer_release_reference.busy_count to ref_count.
      - Add documentation for weston_buffer_release and ..._reference.
    
    Changes in v3:
      - Raise NO_BUFFER for get_release if no buffer has been committed,
        don't raise UNSUPPORTED_BUFFER for non-dmabuf buffers,
        so get_release works for all valid buffers.
      - Destroy the buffer_release object after sending an event.
      - Track lifetime of buffer_release objects per commit, independently
        of any buffers.
      - Use updated protocol interface names.
      - Use correct format specifier for resource ids.
    
    Changes in v2:
      - Raise UNSUPPORTED_BUFFER at commit if client has requested a
        buffer_release, but the committed buffer is not a valid linux_dmabuf.
      - Remove tests that are not viable anymore due to our inability to
        create dmabuf buffers and fences in a unit-test environment.
    
    Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    67629674