aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-09subsurface: don't add to parent list immediatelyKirill Primak
2021-12-09surface: fix non-buffer damage handlingKirill Primak
This commit fixes the way the damage that doesn't come directly from the client is handled.
2021-12-09subsurface: apply position change at the right momentKirill Primak
Subsurface position is considered to be a part of the parent surface's state, therefore it should be modified when the parent is committed.
2021-12-09subsurface: simplify and fix parent commit handlingKirill Primak
2021-12-09Fix incorrect %zd formatting directivesSimon Ser
%zd is for ssize_t. For size_t we should use %zu.
2021-12-09output: introduce wlr_output_set_nameSimon Ser
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
2021-12-07examples: remove unnecessary partial_dependency() callSimon Ser
The definition of the "drm" dep already calls it.
2021-12-07examples: remove unnecessary wlroots deps for clientsSimon Ser
These clients don't need wlroots.
2021-12-07examples/layer-shell: remove wlroots dependencySimon Ser
This is a client example, it shouldn't use a compositor library like wlroots.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-12-07linux-dmabuf-v1: add per-surface feedbackSimon Ser
2021-12-07linux-dmabuf-v1: implement v4Simon Ser
Implement a basic version of linux-dmabuf-unstable-v1 version 4. Only default hints are implemented. The new wlr_linux_dmabuf_feedback_v1 data structure will allow compositors to define their own custom hints in the future. This data structure makes it easy to describe feedback metadata. It's converted to a "compiled" form suitable for marshalling over the Wayland socket via feedback_compile.
2021-12-07render: add wlr_renderer_init_wl_shmSimon Ser
This allows compositors to initialize wl_shm without initializing other globals like linux-dmabuf.
2021-12-06surface: fix damage transformationKirill Primak
2021-12-04Fix wlr_scene_node_lower_to_bottomtiosgz
Before this commit, it would keep the node at the top or make it second- topmost.
2021-12-03output: drop front_bufferSimon Ser
This lets backends immediately release committed buffers if they want to.
2021-12-03screencopy-v1: use wlr_output_event_commit.bufferSimon Ser
2021-12-03export-dmabuf-v1: use wlr_output_event_commit.bufferSimon Ser
2021-12-03output: add wlr_output_event_commit.bufferSimon Ser
This allows output commit listeners to access the newly committed buffer. Currently wlr_output.front_buffer is used but it'll get removed in the next commit.
2021-12-03render/drm-format-set: add wlr_drm_format_set_intersectSimon Ser
This intersects two DRM format sets. This is useful for implementing DMA-BUF feedback in compositors, see e.g. the Sway PR [1]. [1]: https://github.com/swaywm/sway/pull/6313
2021-12-03readme: update wrapper libraries linkSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3336
2021-12-02output: fix modifier strippingSimon Ser
DRM formats with an empty modifier list are invalid. Instead of emptying the list, reduce it to { INVALID }. Add a check to make sure the renderer and backend support implicit modifiers, so that we don't fallback on e.g. Vulkan. Closes: https://github.com/swaywm/sway/issues/6692
2021-12-02render/egl: improve modifier support detectionSimon Ser
Support for EXT_image_dma_buf_import_modifiers doesn't necessarily indicate support for modifiers. For instance, Mesa will advertise EXT_image_dma_buf_import_modifiers for all drivers. This is a trick to allow EGL clients to enumerate supported formats (something EXT_image_dma_buf_import is missing). For more information, see [1]. Add a new wlr_egl.has_modifiers flag which indicates whether modifiers are supported. It's set to true if any eglQueryDmaBufModifiersEXT query returned a non-empty list. Use that flag to figure out whether the buffer modifier should be passed to the EGL implementation on import. [1]: https://github.com/KhronosGroup/EGL-Registry/issues/142
2021-12-02render/pixman: advertise MOD_INVALID instead of MOD_LINEARSimon Ser
The backends and allocators use INVALID, but the renderer uses LINEAR. Running a compositor with WLR_RENDERER=pixman results in: 00:00:00.744 [types/output/render.c:59] Failed to pick primary buffer format for output 'WL-1'
2021-12-01render/egl: add wlr_egl_create_with_contextSimon Ser
This allows creating a wlr_egl from an already-existing EGL display and context. This is useful to allow compositors to choose the exact EGL initialization parameters.
2021-12-01render/egl: store IMG_context_priority in wlr_eglSimon Ser
The next commit will split extension lookup and context initialization.
2021-12-01Fix uninitialized variable errors in release modeQuantum
When using `meson --buildtype=release`, `-Wextra -Werror` is passed. This includes `-Werror=maybe-uninitialized`, which complains about the instances fixed in this commit.
2021-11-30backend/wayland: improve wayland input device nameMoon Sungjoon
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3332 This makes input device names include it's type name
2021-11-30tinywl: use wlr_sceneIsaac Freund
2021-11-30scene: add wlr_scene_get_scene_outputSimon Ser
This allows getting a wlr_scene_output from a wlr_output. Since an output can only be added once to a scene-graph there's no ambiguity. This is useful for compositors using wlr_scene_attach_output_layout: the output layout integration automatically creates a scene-graph output for each wlr_output added to the layout.
2021-11-30types/wlr_drm_lease_v1: add NULL check to drm lease resource destroySimon Zeni
2021-11-30output: add wlr_output_get_primary_formatsSimon Ser
This allows compositors to get primary formats without manually calling wlr_output_impl.get_primary_formats. For example, the Sway patch for linux-dmabuf feedback [1] needs this. [1]: https://github.com/swaywm/sway/pull/6313
2021-11-30output: fix typo in wlr_output_impl.get_primary_formats docsSimon Ser
The buffer capabilities indicate whether the formats returned are for DMA-BUFs or shared memory buffers.
2021-11-30output: don't leave dangling cursor_front_bufferSimon Ser
Sometimes we were calling wlr_output_impl.set_cursor with a NULL buffer, but we weren't clearing wlr_output.cursor_front_buffer. Avoid leaving a dangling buffer behind. Introduce a helper function output_set_hardware_cursor which calls wlr_output_impl.set_cursor and keeps cursor_front_buffer in sync.
2021-11-30output: destroy swapchain when disabledSimon Ser
This avoids consuming GPU memory when an output is disabled.
2021-11-29linux-dmabuf-v1: fix implicit checkRouven Czerwinski
The implicit check to filter out LINEAR for dmabuf checked for INVALID twice instead of checking for INVALID & LINEAR. Fix this. Fixes: d37eb5c2eaed ("linux-dmabuf-v1: filter out LINEAR if implicit") Reported-by: Dawid Czeluśniak <czelusniakdawid@gmail.com>
2021-11-29backend/drm: poison buffers which cannot be scanned outSimon Ser
Rather than repeatedly trying to import DMA-BUFs which cannot be scanned out, mark the failed ones with a special "poison" marker. Inspired from [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/731
2021-11-29Insert new outputs at the end of the listJohn Lindgren
This prevents auto-configuring a new output from changing the position of existing outputs. (v2: simplify insert-at-end logic)
2021-11-28Added whitespace between "output" and "(not"Jonathan Wong
2021-11-27linux-dmabuf-v1: filter out LINEAR if implicitRouven Czerwinski
If only INVALID and LINEAR are valid modifiers, we need to filter out LINEAR since Xwayland won't be able to allocate a BO with the explicit linear modifier on hardware that does not support explicit modifiers. The addition of LINEAR is an internal implementation detail which simplifies the wlroots architecture for now. Evntually Xwayland should be fixed to filter out modifiers that are not supported by the GBM implementation, see [1]. This could be done by querying EGL for the supported modifiers. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1166
2021-11-26scene: add support for viewporterSimon Ser
If the surface has a source box set, use that. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3172
2021-11-26render: add DMA-BUF docsSimon Ser
Document some of the assumptions for DMA-BUF buffer sharing and modifiers.
2021-11-26backend/drm: always add LINEAR to supported modifiersSimon Ser
2021-11-26render/drm_format_set: remove special LINEAR caseSimon Ser
This was used to make the intersection of INVALID and LINEAR result in LINEAR. We can now just require LINEAR to be in both lists.
2021-11-26render/egl: always add LINEAR to supported modifiersSimon Ser
2021-11-26backend/drm: fail on explicit modifier in drmModeAddFB2Simon Ser
drmModeAddFB2 doesn't support explicit modifiers. Only accept INVALID which indicates an implicit modifier and LINEAR which may indicate that GBM_BO_USE_LINEAR has been used.
2021-11-26Require INVALID for implicit format modifiersSimon Ser
See [1] for the motivation. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
2021-11-26render/drm_format_set: add wlr_drm_format_hasSimon Ser
2021-11-25scene: add wlr_scene_xdg_surface_createSimon Ser
This allows compositors to easily add an xdg_surface to the scene-graph while retaining the ability to unconstraint popups and decide their final position. Compositors can handle new popups with the wlr_xdg_shell.new_surface event, get the parent scene-graph node via wlr_xdg_popup.parent.data, create a new scene-graph node via wlr_scene_xdg_surface_tree_create, and unconstraint the popup if they want to.
2021-11-25backend: remove noop backendSimon Zeni