output: add wlr_output_is_direct_scanout_allowed()

This lets compositors check whether direct scan-out is possible. Compositors will soon be responsible for manually calling this function.

wlr_output is not well-suited to checking whether direct scan-out is happening or not. Compositors may want to use their own external swapchains, for instance.

Additionally, ab7eabac ("output: leverage wlr_output_configure_primary_swapchain()") makes it so output_basic_test() is called before the output swapchain is initialized, resulting in false positives.

Closes: #3620 (closed)

Breaking change: compositors now need to check wlr_output_is_direct_scanout_allowed() before direct scan-out.

Edited by Alexander Orzechowski

Merge request reports