aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-07-22types/wlr_buffer: remove wlr_renderer argument from wlr_buffer_from_resourceSimon Zeni
2021-07-22render: drop wlr_renderer_impl.init_wl_displaySimon Ser
Now that we have our own wl_drm implementation, there's no reason to provide custom renderer hooks to init a wl_display in the interface. We can just initialize the wl_display generically, depending on the renderer capabilities.
2021-07-22backend: make DRM and libinput backends optionalayaka
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-07-20backend/drm: stop restoring CRTCs on exitSimon Ser
This is the cause of the spurious "drmHandleEvent failed" messages at exit. restore_drm_outputs calls handle_drm_event in a loop without checking whether the FD is readable, so drmHandleEvent ends up with a short read (0 bytes) and returns an error. The loop's goal is to wait for all queued page-flip events to complete, to allow drmModeSetCrtc calls to succeed without EBUSY. The drmModeSetCrtc calls are supposed to restore whatever KMS state we were started with. But it's not clear from my PoV that restoring the KMS state on exit is desirable. KMS clients are supposed to save and restore the (full) KMS state on VT switch, but not on exit. Leaving our KMS state on exit avoids unnecessary modesets and allows flicker-free transitions between clients. See [1] for more details, and note that with Pekka we've concluded that a new flag to reset some KMS props to their default value on compositor start-up is the best way forward. As a side note, Weston doesn't restore the CRTC by does disable the cursor plane on exit (see drm_output_deinit_planes, I still think disabling the cursor plane shouldn't be necessary on exit). Additionally, restore_drm_outputs only a subset of the KMS state. Gamma and other atomic properties aren't accounted for. If the previous KMS client had some outputs disabled, restore_drm_outputs would restore a garbage mode. [1]: https://blog.ffwll.ch/2016/01/vt-switching-with-atomic-modeset.html
2021-07-19buffer: re-use wlr_shm_client_bufferSimon Ser
The first time wlr_buffer_from_resource is called with a wl_buffer resource that originates from wl_shm, create a new wlr_shm_client_buffer as usual. If wlr_buffer_from_resource is called multiple times, re-use the existing wlr_shm_client_buffer. This commit changes how the wlr_shm_client_buffer lifetime is managed: previously it was destroyed as soon as the wlr_buffer was released. With this commit it's destroyed when the wl_buffer resource is. Apart from de-duplicating wlr_shm_client_buffer creations, this allows to easily track when a wlr_shm_client_buffer is re-used. This is useful for the renderer and the backends, e.g. the Pixman renderer can keep using the same Pixman image if the buffer is re-used. In the future, this will also allow to re-use resources in the Wayland and X11 backends (remote wl_buffer objects for Wayland, pixmaps for X11).
2021-07-19input/pointer: send axis source once per frameVyivel
Only one wl_pointer.axis_source event is permitted per frame, according to the Wayland specification. Fixes https://github.com/swaywm/wlroots/issues/2973
2021-07-12output: remove wlr_output_impl.export_dmabufSimon Ser
No backend is using it anymore.
2021-07-12backend/headless: remove wlr_output_impl.export_dmabufSimon Ser
This is now provided by the generic wlr_output implementation.
2021-07-12output: add generic wlr_output_export_dmabuf implementationSimon Ser
When wlr_output manages its own swap-chain, there's no need to hook into the backend to grab DMA-BUFs. Instead, maintain a wlr_output.front_buffer field with the latest committed buffer.
2021-07-12buffer: drop resource arg from wlr_client_buffer_createSimon Ser
This function doesn't need the wl_resource anymore. In the failure paths, wlr_buffer_unlock in surface_apply_damage will take care of sending wl_buffer.release.
2021-07-12render/gles2: rename wlr_egl.exts to better match KhronosSimon Ser
Khronos refers to extensions with their namespace as a prefix in uppercase. Change our naming to align with Khronos conventions. This also makes grepping easier.
2021-07-12render/egl: rename wlr_egl.exts to better match KhronosSimon Ser
Khronos refers to extensions with their namespace as a prefix in uppercase. Change our naming to align with Khronos conventions. This also makes grepping easier.
2021-07-09buffer: drop wlr_client_buffer.resourceSimon Ser
2021-07-09buffer: add wlr_client_buffer.sourceSimon Ser
This stores a weak reference to the source buffer.
2021-07-09buffer: stop using source resource in wlr_client_buffer_apply_damageSimon Ser
This is the first step towards dropping wlr_client_buffer.resource.
2021-07-09types/wlr_buffer: remove wlr_resource_get_buffer_sizeSimon Zeni
2021-07-09types/wlr_surface: get buffer size from wlr_buffer_importSimon Zeni
2021-07-09types/wlr_buffer: split wlr_client_buffer_import functionSimon Zeni
`wlr_client_buffer_import` is splitted in two distincts function: - wlr_buffer_from_resource, which transforms a wl_resource into a wlr_buffer - wlr_client_buffer_create, which creates a wlr_client_buffer from a wlr_buffer by creating a texture from it and copying its wl_resource
2021-07-09backend/drm: remove backend arg from wlr_drm_interface.crtc_commitSimon Ser
The callee can just get it from the wlr_drm_connector.
2021-07-09backend/drm: add test_only arg to wlr_drm_interface.crtc_commitSimon Ser
Right now callers of drm_crtc_commit need to check whether the interface is legacy or atomic before passing the TEST_ONLY flag. Additionally, the fallbacks for legacy are in-place in the common code. Add a test_only arg to the crtc_commit hook. This way, there's no risk to pass atomic-only flags to the legacy function (add an assert to ensure this) and all of the legacy-specific logic can be put back into legacy.c (done in next commit).
2021-07-08seat: add wlr_seat_touch_{send,notify}_frameSimon Ser
The wl_touch.frame event is used to group multiple touch events together. Instead of sending it immediately after each touch event, rely on the backend to send it (and on the compositor to relay it). This is a breaking change because compositors now need to manually send touch frame events instead of relying on wlr_seat to do it.
2021-07-08cursor: add touch frame eventSimon Ser
2021-07-08backend/libinput: send touch frame eventsSimon Ser
2021-07-08touch: add frame eventSimon Ser
2021-07-06util/box: stabilize interfaceSimon Zeni
2021-07-06move wlr_box from /types to /utilSimon Zeni
2021-07-06types/wlr_box: remove unused wlr_box_from_pixman_box32 and ↵Simon Zeni
wlr_box_rotated_bounds functions
2021-07-05buffer: stop sending wl_buffer.release events from wlr_client_bufferSimon Ser
The specialized client buffer implementations take care of this.
2021-07-05buffer: remove renderer param from wlr_resource_get_buffer_sizeSimon Ser
The only reason we had this was because of EGL_WL_bind_wayland_display support, which has been dropped.
2021-07-05render/egl: remove EGL_WL_bind_wayland_display supportSimon Ser
Our GLES2 renderer doesn't use it anymore, so we can drop it.
2021-07-05render: remove wl_drm support from wlr_rendererSimon Ser
Everything needs to go through the unified wlr_buffer interface now. If necessary, there are two ways support for EGL_WL_bind_wayland_display could be restored by compositors: - Either by using GBM to convert back EGL Wayland buffers to DMA-BUFs, then wrap the DMA-BUF into a wlr_buffer. - Or by wrapping the EGL Wayland buffer into a special wlr_buffer that doesn't implement any wlr_buffer_impl hook, and special-case that buffer type in the renderer.
2021-07-05drm: add support for DMA-BUFsSimon Ser
Mesa's Vulkan WSI still uses wl_drm when modifiers aren't supported. This has been fixed in [1] but will take some time to be propagated to users. In the meantime, add a fallback. [1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4942
2021-07-05Add a stub wl_drm implementationSimon Ser
This will allow us to remove all of our EGL wl_drm support code and remove some weird stuff we need just for wl_drm support. In particular, wl_drm buffers coming from the EGL implementation can't easily be wrapped into a wlr_buffer properly.
2021-07-05xcursor: improve documentationSimon Ser
2021-07-05region: drop leftover reference to the mailing listSimon Ser
As per [1], the mailing list isn't used anymore. [1]: https://github.com/swaywm/wlroots/pull/3016 Fixes: 82af6e720870 ("region: stabilize interface")
2021-07-05region: stabilize interfaceSimon Ser
References: https://github.com/swaywm/wlroots/issues/1008
2021-07-05Remove reference to the announce mailing listSimon Ser
The mailing list has never been used. I think listing the deprecated functions in the release notes is enough. I'd rather not add the burden of maintaining a separate communication medium.
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-07-01render: drop wlr_renderer_impl.texture_from_dmabufSimon Ser
2021-07-01buffer: add wlr_dmabuf_bufferSimon Ser
2021-07-01render: drop wlr_renderer_impl.texture_from_pixelsSimon Ser
2021-07-01buffer: introduce wlr_readonly_data_bufferSimon Ser
2021-07-01Drop wlr_listSimon Ser
2021-07-01tablet: stop using wlr_listSimon Ser
2021-07-01backend/libinput: stop using wlr_list internallySimon Ser
2021-07-01util/array: add array_remove_atSimon Ser
2021-07-01Remove unused wlr_list.h includesSimon Ser
2021-06-30render/egl: replace wlr_egl_create with wlr_egl_create_with_drm_fdSimon Ser
We never create an EGL context with the platform set to something other than EGL_PLATFORM_GBM_KHR. Let's simplify wlr_egl_create by taking a DRM FD instead of a (platform, remote_display) tuple. This hides the internal details of creating an EGL context for a specific device. This will allow us to transparently use the device platform [1] when the time comes. [1]: https://github.com/swaywm/wlroots/pull/2671
2021-06-30touch: document event data typesSimon Ser
2021-06-30pointer: document event data typesSimon Ser