aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-07output-damage: fix output swapchain handlingSimon Ser
When wlr_output.swapchain is used instead of the backend's, the buffer_type will be set to SCANOUT even if wlr_output_attach_render has been called. This tricks wlr_output_damage into thinking the whole output needs to be repainted. Workaround this issue by forcing buffer_type to RENDER when the output has a back-buffer set. Will clean all of that up when removing the precommit event handler altogether. This commit fixes damage tracking on the Wayland, X11 and headless backends.
2021-07-07output: detach buffer from renderer before commitSimon Ser
Right now we rely entirely on implicit sync for synchronizing access to GPU buffers. Implicit sync works by setting synchronization points on the buffer in writers, and letting readers wait on these sync points before accessing the buffer. With OpenGL, sync points are created using functions such as eglSwapBuffers or glFlush. If none of these special functions are called, no sync point will be created and readers will potentially access a buffer that hasn't finished rendering yet. In the context of wlroots, OpenGL is the writer and the backend (KMS or parent Wayland/X11 session) is the reader. After we're done rendering a frame, and before passing that frame to the backend, we need to call glFlush. glFlush is called when the buffer is detached from the renderer. This is a task done by output_clear_back_buffer. So let's call this function before invoking the impl->commit hook, instead of calling it after. All of this is maybe a little tricky to get right with the current renderer_bind_buffer API. The new wlr_renderer_begin_with_buffer API is much better, because glFlush is called on wlr_renderer_end, so it's more intuitive. Closes: https://github.com/swaywm/wlroots/issues/3020
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: unify texture creation in wlr_client_buffer_importSimon Ser
All code-paths now invoke wlr_texture_from_buffer. De-duplicate the calls.
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-05render/gles2: use wlr_drm for wl_drm implementationSimon Ser
This allows use to remove all of our special wl_drm support code.
2021-07-05buffer: handle wl_drm buffersSimon Ser
This allows renderers to choose between implementing the old wlr_renderer_impl.texture_from_wl_drm hook, or opt for the new wlr_drm stub. The stub has the advantage of not requiring any special support code: stubbed wl_drm buffers look exactly like DMA-BUFs from linux-dmabuf-unstable-v1.
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-05backend/drm: don't clear pending cursor FB on failed commitSimon Ser
The previous fix tried to side-step cursor->pending_fb completely. However that messes up our buffer locking mechanism. Instead, stop clearing the pending cursor FB on a failed commit. The pending cursor FB will remain for the next commit. Fixes: 6c3d080e25e5 ("backend/drm: populate cursor plane's current_fb")
2021-07-05Revert "backend/drm: populate cursor plane's current_fb"Simon Ser
This reverts commit 6c3d080e25e56404228ad7704eed43e40fa0c623. Populating wlr_drm_plane.current_fb messes up the buffer's locking. The previous buffer is released while it's still being displayed on-screen.
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-05surface: allow locking pending state in commit handlerSimon Ser
We were bumping the pending sequence number after emitting the commit event, so commit handlers were seeing inconsistent state where current.seq == pending.seq. This prevents commit handlers from immediately locking the pending state. Fix this by bumping the pending sequence number before firing the commit event.
2021-07-05backend/libinput: use wl_array for wlr_libinput_tablet.toolsSimon Ser
Instead of using a single-field wl_list, let's just use a wl_array.
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-01render: use wlr_dmabuf_buffer in wlr_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-01render: use wlr_readonly_data_buffer in wlr_texture_from_pixelsSimon Ser
2021-07-01buffer: introduce wlr_readonly_data_bufferSimon Ser
2021-07-01tablet-v2: fix pad and tool object versionsSimon Ser
These were hardcoded to 1. Instead, create the resource with the version of the parent object.
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-30surface: accept commits with buffer size not divisible by scaleSimon Ser
There are still many situations where the buffer scale is not divisible by scale. The fix will require a tad more work, so let's just log the client error for now and continue handling the surface commit as usual. Closes: https://github.com/swaywm/sway/issues/6352
2021-06-30touch: document event data typesSimon Ser
2021-06-30pointer: document event data typesSimon Ser
2021-06-29surface: make wlr_subsurface_create privateSimon Ser
Same as [1], but for wlr_subsurface. [1]: https://github.com/swaywm/wlroots/pull/2814
2021-06-29surface: remove SURFACE_VERSIONSimon Ser
surface_create is now private, so no need to worry about the version being too high anymore.
2021-06-29Drop WLR_VERSION_API_*Simon Ser
These weren't set in the build, thus Meson was just dropping them in the generated file.
2021-06-25ci: make Meson warnings fatalSimon Ser
New warnings can be hard to notice in CI, since CI will just pass in that case. Meson sometimes uses warnings for important mistakes, e.g. invalid option. Let's turn warnings into errors so that we can spot these more easily.
2021-06-25ci: remove -Dlibseat from Alpine buildSimon Ser
This build option doesn't exist anymore.
2021-06-25build: use meson.global_build_root()Simon Ser
meson.build_root() is deprecated. References: https://github.com/mesonbuild/meson/pull/8629
2021-06-25xwayland: improve startup log messageSimon Ser
Logging the raw Xwayland command-line was incomplete, uninformative and confusing for end-users. Instead, print a proper message in English.
2021-06-24render/egl: make most functions privateSimon Ser
The wlr_egl functions are mostly used internally by the GLES2 renderer. Let's reduce our API surface a bit by hiding them. If there are good use-cases for one of these, we can always make them public again. The functions mutating the current EGL context are not made private because e.g. Wayfire uses them.
2021-06-24render/egl: remove stale wlr_egl_export_image_to_dmabuf declSimon Ser
This function has been removed, but we forgot to drop it from the header.
2021-06-24backend/drm: rename page_flip_handler to handle_page_flipSimon Ser
This is more consistent with the rest of the wlroots naming.
2021-06-23build: bump version to 0.15.0Simon Ser