aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
AgeCommit message (Collapse)Author
2021-11-15backend/headless: unlink input device on destroyRoman Gilg
Removing an input device requires unlinking it from the list of all headless input devices. For that implement a destroy function.
2021-10-15output: add presented flag to presentation eventKirill Primak
2021-10-15output: disallow NULL event for wlr_output_send_present()Kirill Primak
2021-09-30backend: create renderer and allocator in wlr_backend_autocreateSimon Ser
Instead of ensuring the renderer and allocator are initialized in each backend, do it in wlr_backend_autocreate. This allows compositors to create backends without any renderer/allocator if they side-step wlr_backend_autocreate. Since the wlr_backend_get_renderer and backend_get_allocator end up calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds like a good idea to centralize all of the opimionated bits in one place.
2021-08-25Move allocator stuff into new directorySimon Ser
Add render/allocator/ and include/render/allocator/ to hold everything allocator-related.
2021-07-12backend/headless: remove wlr_output_impl.export_dmabufSimon Ser
This is now provided by the generic wlr_output implementation.
2021-07-01buffer: make enum wlr_buffer_cap publicSimon Ser
Custom backends and renderers need to implement wlr_backend_impl.get_buffer_caps and wlr_renderer_impl.get_render_buffer_caps. They can't if enum wlr_buffer_cap isn't made public.
2021-06-20backend: add output state allow-listsSimon Ser
Right now, when a new output state field is added, all backends by default won't reject it. This means we need to add new checks to each and every backend when we introduce a new state field. Instead, introduce a bitmask of supported output state fields in each backend, and error out if the user has submitted an unknown field. Some fields don't need any backend involvment to work. These are listed in WLR_OUTPUT_STATE_BACKEND_OPTIONAL as a convenience.
2021-06-07backend/headless: remove swapchainSimon Ser
Rely on wlr_output's generic swapchain support instead of creating our own. The headless output now simply keeps a reference to the front buffer and does nothing else.
2021-05-21backend/headless: use common renderer and allocatorSimon Ser
Instead of managing our own renderer and allocator, let the common code do it. Because wlr_headless_backend_create_with_renderer needs to re-use the parent renderer, we have to hand-roll some of the renderer initialization.
2021-05-21backend: introduce wlr_backend_finishSimon Ser
This new functions cleans up the common backend state. While this currently only emits the destroy signal, this will also clean up the renderer and allocator in upcoming patches.
2021-04-29backend/headless: dup DRM FD in wlr_headless_backend_create_with_rendererSimon Ser
We were not dup'ing the DRM FD coming from wlr_renderer_get_drm_fd, resulting in a double-close on backend destroy.
2021-04-28backend: use wlr_allocator_autocreateSimon Zeni
2021-04-28backend: introduce backend_get_buffer_capsSimon Zeni
2021-04-28render/gbm_allocator: make wlr_gbm_allocator_create return a wlr_allocatorSimon Zeni
2021-04-26Log drmGetDevices2 error codeSimon Ser
2021-04-15render: rename get_dmabuf_render_formats into get_render_formatsSimon Zeni
2021-02-18backend: add error messages in attach_render implsSimon Ser
2021-01-17backend/headless: create renderer after wlr_backend_initSimon Ser
We were calling wlr_renderer_autocreate before wlr_backend_init, which caused a NULL dereference on wlr_backend.impl.
2021-01-16render/gles2: make EGL context current in bind_bufferSimon Ser
Instead of requiring callers to manually make the EGL context current before binding a buffer and unsetting it after unbinding a buffer, do it inside wlr_renderer_bind_buffer. This hides renderer-specific implementation details inside the wlr_renderer interface. Non-GLES2 renderers may not use EGL. This removes all EGL dependencies from the backends. References: https://github.com/swaywm/wlroots/issues/2618 References: https://github.com/swaywm/wlroots/pull/2615#issuecomment-756687006
2021-01-16render: remove egl include from wlr_rendererSimon Zeni
2021-01-16render: drop egl parameters from wlr_renderer_autocreateSimon Zeni
2021-01-16backend/headless: implement get_drm_fdSimon Ser
2021-01-14backend: remove unnecessary GLES2 includesSimon Ser
2021-01-12render/egl: remove surface and buffer age args from make_currentSimon Ser
These aren't used anymore.
2021-01-07remove unnecessary egl includesSimon Zeni
2021-01-07backend: remove wlr_egl from all backendsSimon Zeni
2021-01-06render: remove EGL config and visual from wlr_renderer_autocreateSimon Ser
This isn't used anymore by any backend. Some examples still provide an EGL config to wlr_egl_init, so we can't drop it yet there.
2020-12-30Remove wlr_create_renderer_func_tSimon Ser
This callback allowed compositors to customize the EGL config used by the renderer. However with renderer v6 EGL configs aren't used anymore. Instead, buffers are allocated via GBM and GL FBOs are rendered to. So customizing the EGL config is a no-op.
2020-12-16backend/headless: select the rendering device ourselvesSimon Ser
Backends will eventually stop creating their renderer. To prepare for this, stop using EGL_PLATFORM_SURFACELESS_MESA in the headless renderer. Pick a render node using libdrm. The new allocator/renderer creation logic looks very much like what will end up in common code.
2020-12-15backend: use fcntl(F_DUPFD_CLOEXEC) instead of dupSimon Ser
This makes sure the CLOEXEC flag is set on the dup'ed FD.
2020-12-08backend/headless: add support for direct scan-outSimon Ser
I was about to add a check to fail instead of crash when the compositor uses direct scan-out, but with renderer v6 it's so simple to just add support for direct scan-out, why bother? Closes: https://github.com/swaywm/wlroots/issues/2523
2020-12-07backend/headless: create a config-less EGL contextSimon Ser
2020-11-30backend/headless: use a format suitable for renderingSimon Ser
When allocating buffers, use a format suitable for rendering. This avoids picking a format that won't work.
2020-11-15backend/headless: implement export_dmabufSimon Ser
2020-11-15backend/headless: switch to wlr_swapchainSimon Ser
2020-11-11Remove unneeded includes from wlr_input_device.hIsaac Freund
This uncovered many places where we were using things without directly including them.
2020-06-19output: rename impl->rollback to rollback_renderSimon Ser
The output backend API is now mostly state-less thanks to the atomic hooks (commit and test). There is one exception though: attach_render. This function makes the rendering context current. However sometimes the compositor might decide not to render after attach_render (e.g. when there's nothing new to render to the back buffer). Thus wlr_output_rollback has been introduced to revert the pending state. Because the output backend API is mostly state-less, the only thing wlr_output_impl.rollback needs to do is revert the current rendering context. Rename the function to rollback_render to make this clear. Add a check in the common wlr_output code to only call rollback_render when attach_buffer has been previously called. On the long term, we'll be able to remove attach_render and rollback_render together.
2020-05-19render/egl: introduce wlr_egl_unset_currentSimon Ser
This function can be called after wlr_egl_make_current to cleanup the EGL context. This avoids having lingering EGL contexts that make things work by chance. Closes: https://github.com/swaywm/wlroots/issues/2197
2020-05-02backend/headless: handle renderer destroySimon Ser
When the headless backend uses an already-existing renderer, it doesn't have ownership over the renderer. When the renderer is destroyed, the headless backend needs to destroy itself.
2020-04-22backend/headless: add wlr_headless_backend_create_with_rendererSimon Ser
This allows one to create a headless backend with an existing renderer.
2020-04-22backend/headless: use FBOs instead of pbuffersSimon Ser
2020-04-09backend: set EGL_RENDERABLE_TYPE and EGL_SURFACE_TYPESimon Ser
Ensure these are set to the correct value.
2020-04-08Add wlr_output_impl.rollbackSimon Ser
Most of the pending output state is not forwarded to the backend prior to an output commit. For instance, wlr_output_set_mode just stashes the mode without calling any wlr_output_impl function. wlr_output_impl.commit is responsible for applying the pending mode. However, there are exceptions to this rule. The first one is wlr_output_attach_render. It won't go away before renderer v6 is complete, because it needs to set the current EGL surface. The second one is wlr_output_attach_buffer. wlr_output_impl.attach_buffer is removed in [1]. When wlr_output_rollback is called, all pending state is supposed to be cleared. This works for all the state except the two exceptions mentionned above. To fix this, introduce wlr_output_impl.rollback. Right now, the backend resets the current EGL surface. This prevents GL commands from affecting the output after wlr_output_rollback. This patch is required for FBO-based outputs to work properly. The compositor might be using FBOs for its own purposes [2], having leftover FBO state can have bad consequences. [1]: https://github.com/swaywm/wlroots/pull/2097 [2]: https://github.com/swaywm/wlroots/pull/2063#issuecomment-597614312
2020-04-08backend: reset EGL surface after buffer swapSimon Ser
This prevents GL commands to affect a previously current EGL surface after a buffer swap.
2020-04-08output: introduce wlr_output_testSimon Ser
2020-01-12render/egl: remove SURFACELESS_MESA special caseSimon Ser
Users can just pass EGL_DEFAULT_DISPLAY themselves.
2019-12-30output: re-introduce atomic mode, enabled, scale and transformSimon Ser
This reverts commit 01f903874b7e27539488fad7f31476d5bcbc6ac9 and re-applies commit ee5f98ad49fed0439f3313ec685307831d1d1d05. Updates: https://github.com/swaywm/wlroots/issues/1640 (Atomic output updates issue) See also: https://github.com/swaywm/wlroots/pull/1762 (Atomic output updates original PR) See also: https://github.com/swaywm/wlroots/issues/1780 (Issue caused by atomic output updates) See also: https://github.com/swaywm/sway/issues/4419 (Issue caused by atomic output updates) See also: https://github.com/swaywm/wlroots/pull/1781 (Revert PR)
2019-12-29output: add descriptionSimon Ser
wlr_output.description is a string containing a human-readable string identifying the output. Compositors can customise it via wlr_output_set_description, for instance to make the name more user-friendly. References: https://github.com/swaywm/wlroots/issues/1623
2019-12-23meson: Various improvementsScott Anderson
Bumps minimum version to 0.51.0 - Remove all intermediate static libraries. They serve no purpose and are just add a bunch of boilerplate for managing dependencies and options. It's now managed as a list of files which are compiled into libwlroots directly. - Use install_subdir instead of installing headers individually. I've changed my mind since I did that. Listing them out is annoying as hell, and it's easy to forget to do it. - Add not_found_message for all of our optional dependencies that have a meson option. It gives some hints about what option to pass and what the optional dependency is for. - Move all backend subdirectories into their own meson.build. This keeps some of the backend-specific build logic (especially rdp and session) more neatly separated off. - Don't overlink example clients with code they're not using. This was done by merging the protocol dictionaries and setting some variables containing the code and client header file. Example clients now explicitly mention what extension protocols they want to link to. - Split compositor example logic from client example logic. - Minor formatting changes