Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unstable dmabuf-pool API #130

Merged
merged 1 commit into from Jul 5, 2021
Merged

Add unstable dmabuf-pool API #130

merged 1 commit into from Jul 5, 2021

Commits on Jul 5, 2021

  1. Add unstable dmabuf-pool API

    Introduce wpe_view_backend_dmabuf_pool_fdo, a wpe_view_backend extension that
    demands manual dmabuf managemenet from the user.
    
    This approach to buffer management allows for most flexibility in terms of what
    kind of dmabuf objects should be used for rendering. It allows for user to
    specify in detail the format, multi-planarity and modifier data of the dmabuf
    object.
    
    In order to work with such dmabuf objects, the renderer_backend_egl interfaces
    have to leverage a new WS::EGLClient implementation that uses custom Wayland
    protocols to properly handle dmabuf content across process boundaries. To
    correctly render into these objects, we have to leverage the surfaceless EGL
    platform, along with importing the dmabuf objects into EGLImages that we then
    use as backing resources for renderbuffers used to render a given frame.
    
    For each wpe_view_backend_dmabuf_pool_fdo, the related client (managed by the
    user) has to provide callback implementations that handle dmabuf pool entry
    management as well as the notification of which dmabuf pool entry has been
    committed for display as the content of the related view.
    
    Upon the create_entry callback dispatch on the client, the callback (as provided
    by the user) has to return a wpe_dmabuf_pool_entry object that was initialized
    with the relevant dmabuf data. Upon the destroy_entry callback dispatch, the
    specified object has to be destroyed.
    
    The commit_entry callback dispatch on the client specifies which dmabuf object
    should be presented on the screen, containing the most-recent composition of the
    corresponding view's content.
    
    The dmabuf pool entry allocations and deallocations are relayed from the
    renderer_backend_target_egl implementation. Whenever a new buffer is required
    for rendering, the renderer_backend_target_egl will request for a pool entry to
    be created, getting back the relevant dmabuf information and spawning necessary
    GL resources that are needed to render into that dmabuf. When finished, the
    pool entry will be committed, leaving it up to the user to handle the pool entry
    as required.
    zdobersek committed Jul 5, 2021
    Copy the full SHA
    886c2de View commit details
    Browse the repository at this point in the history