Age | Commit message (Collapse) | Author |
|
This avoids open-coding our own logic. The resulting code is more
readable.
References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
|
|
Since [1], we can get the wl_display directly from the wl_global.
[1]: https://gitlab.freedesktop.org/wayland/wayland/-/commit/2b22160fb690a76247aa9bd0be3069ff43e8239f
|
|
Allows the compositor to submit tokens to the pool of
currently active tokens. This can be useful when the
launcher doesn't use or support xdg-activation-v1 by
itself - e.g. when it is X11 based or use gtk_shell1.
|
|
Otherwise it will send enter events to clients that already
have keyboard/pointer focus.
Notably Qt applications warns about this.
|
|
This doesn't work if scene outputs are not used as the primary output of
scene surfaces will always be NULL.
Therefore, take a wlr_scene_output instead of separate wlr_scene and
wlr_output arguments and rename the function to
wlr_scene_output_send_frame_done().
The actual behavior of the function is unchanged.
|
|
|
|
|
|
This allows compositors to avoid sending multiple frame done events
to a surface that is rendered on multiple outputs at once. This may
also be used in the same way for presentation feedback.
|
|
Co-authored-by: Simon Ser <contact@emersion.fr>
|
|
This helper is responsible for listening for new DRM devices and
create new child DRM backends as necessary.
|
|
The multi backend was returned instead of the primary DRM backend.
|
|
Two new events are added: name and description. The name is
immutable. The description can be updated on-the-fly.
|
|
|
|
This commit fixes the way the damage that doesn't come directly from the
client is handled.
|
|
Subsurface position is considered to be a part of the parent surface's
state, therefore it should be modified when the parent is committed.
|
|
|
|
%zd is for ssize_t. For size_t we should use %zu.
|
|
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.
|
|
The definition of the "drm" dep already calls it.
|
|
These clients don't need wlroots.
|
|
This is a client example, it shouldn't use a compositor library
like wlroots.
|
|
wayland-client isn't really used by wlroots core, so let's move the
dep to where it's needed in the Wayland backend.
|
|
|
|
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.
|
|
This allows compositors to initialize wl_shm without initializing
other globals like linux-dmabuf.
|
|
|
|
Before this commit, it would keep the node at the top or make it second-
topmost.
|
|
This lets backends immediately release committed buffers if they
want to.
|
|
|
|
|
|
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.
|
|
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
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3336
|
|
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
|
|
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
|
|
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'
|
|
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.
|
|
The next commit will split extension lookup and context
initialization.
|
|
When using `meson --buildtype=release`, `-Wextra -Werror` is passed.
This includes `-Werror=maybe-uninitialized`, which complains about
the instances fixed in this commit.
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3332
This makes input device names include it's type name
|
|
|
|
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.
|
|
|
|
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
|
|
The buffer capabilities indicate whether the formats returned are
for DMA-BUFs or shared memory buffers.
|
|
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.
|
|
This avoids consuming GPU memory when an output is disabled.
|
|
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>
|
|
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
|
|
This prevents auto-configuring a new output from changing the
position of existing outputs.
(v2: simplify insert-at-end logic)
|