Skip to content
  • Pekka Paalanen's avatar
    libweston: new head-based output management API · 992a8cb3
    Pekka Paalanen authored
    
    
    Introduce the API for users (compositors) to create an output from a
    head, attach and detach heads, and destroy outputs created this way.
    This also adds the backend-facing API to libweston.
    
    In the new API design, a backend creates heads, and the compositor
    chooses one or more heads (clone mode) to be driven by an output.
    In the future backends will be converted to not create outputs directly
    but only in the new create_output hook.
    
    The user subscribes to a heads_changed hook and arranges heads into
    outputs from there.
    
    Adding the API this way will allow frontends (main.c) and backends to be
    converted one by one. This adds compatiblity paths in
    weston_compositor_create_output_with_head() and weston_output_destroy()
    so that frontends can be converted first to call these, and then
    backends can be converted one by one to the new design. Afterwards, the
    compatibility paths will be removed along with weston_output::head.
    
    Currently heads can be added to a disabled output only. This is less
    than ideal for clone mode hotplug and should be improved on later.
    
    v4: Remove the wl_output global on head detach if output is enabled.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: default avatarDerek Foreman <derekf@osg.samsung.com>
    Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
    992a8cb3