Age | Commit message (Collapse) | Author |
|
These are unused.
|
|
.. by including wlr_buffer.h
|
|
Avoids having to walk the list of all textures.
|
|
Avoids having to walk the list containing all of the render buffers.
|
|
When starting up, the compositor might call wlr_output_set_mode()
with a mode which is already the current one. wlroots will detect
this and make the wlr_output_set_mode() call a no-op. During the
next wlr_output_commit() call, wlroots will perform an atomic
commit without the ALLOW_MODESET flag.
This is an issue, because some drivers need ALLOW_MODESET even if
the mode is the same. For instance, if the FB stride or modifier
changed, some drivers require a modeset.
Add a new flag "allow_artifacts" which is set when the compositor
calls mode-setting functions. Use this flag to figure out whether
we want to perform atomic commits with ALLOW_MODESET.
(The name "allow_artifacts" is picked because ALLOW_MODESET is a
misnomer, see [1].)
[1]: https://patchwork.freedesktop.org/patch/505107/
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3499
|
|
Instead of using low-level wl_shm_buffer and wlr_dmabuf_v1_buffer
APIs, use the unified wlr_buffer APIs. That way it doesn't matter
what the exact wlr_buffer implementation is used, any which provides
the necessary capabilities (data_ptr or dmabuf) would work.
Simplifies the logic a bit, and will make the transition to wlr_shm
easier.
|
|
Make it clear it's only about shm, not about DMA-BUFs.
|
|
Will allow us to simplify common shm/DMA-BUF logic later on.
|
|
Make it clear that one is for shm buffers only, and the other is
for DMA-BUF buffers only.
|
|
|
|
CTA-861-H defines a picture aspect ratio which may be attached to
each mode. This affects the way the sink will display the image.
See annexes H.1 and H.2 for examples.
|
|
The back buffer is no longer set at commit time since 0556aa0c5918
("output: rejigger attach/clear for back buffer").
Instead, check whether the buffer belongs to the output swapchain.
This is more robust.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3496
|
|
See the spec at [1]. tl;dr EGL has terrible defaults: eglTerminate()
may have side-effects on completely unrelated EGLDisplay objects.
This extension allows us to opt-in to get the sane behavior:
eglTerminate() only free's our own EGLDisplay without affecting
others.
[1]: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_display_reference.txt
|
|
Be consistent with other headers.
|
|
wlr_buffer.c is difficult to read because it contains a mixed bag
of unrelated things: base buffer type, buffer implementations,
buffer resource factory, and client buffer.
Split each of these into their own file.
|
|
|
|
Same as the previous commit.
|
|
dac040f87fee1cfdd7660aa1786b0734d95e03a4 mistakenly renamed
xdg_surface_destroy listener, which was listening to *unmap* events, to
xdg_surface_unmap. The actual fix, however, is to listen to destroy
events. This fixes various crashes.
|
|
We don't need to store the list of enabled extensions.
While at it, rename variables to be less confusing.
|
|
These are unused.
|
|
It returns a bool, not an int.
|
|
This was previously used by the X11 backend but is no longer required
since the previous commit.
|
|
Previously, adaptive sync was just a hint and wouldn't make any
atomic commit fail if the backend didn't support it. The main reason
is wlr_output_test wasn't supported at the time.
Now that we have a way for compositors to test whether a change can
work, let's remove the exception for adaptive sync and convert it to
a regular output state field.
|
|
|
|
|
|
|
|
This simplifies some of the growth logic, but uses array_realloc to shrink the
array if needed.
|
|
array_realloc will grow the array for the target size like wl_insert_add, but
will also shrink the array if the target size is sufficiently smaller than the
current allocation.
|
|
|
|
|
|
|
|
|
|
visibility
|
|
|
|
Also make the regular rendering logic use the introduced
render list.
|
|
|
|
This indicates whether the surface offset has changed.
|
|
This lets the renderer handle the wlr_buffer directly, just like it
does in texture_from_buffer. This also allows the renderer to batch
the rectangle updates, and update more than the damage region if
desirable (e.g. too many rects), so can be more efficient.
|
|
We were firing the new_input signal on backend initialization,
before the compositor had the chance to add a listener for it.
Mimick what's done for wl_keyboard: if the backend hasn't been
started, delay wl_touch initialization.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3473
|
|
We can just use libdrm's drmModeConnection enum instead.
|
|
- Add wlr_output.enabled checks to CONNECTED checks
- Replace NEEDS_MODESET with CONNECTED
|
|
|
|
Closes: #3405
Supersedes: !3562
Co-authored-by: Xiao YaoBing <xiaoyaobing@qq.com>
|
|
This implements the single-pixel-buffer-v1 protocol [1], to allow clients
to create 1x1 buffers with a single color.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/104
|
|
This version adds a wm_capabilities event.
|
|
No need to manually maintain this table now.
The wlroots names and the libdrm (= kernel) names all match.
References: https://gitlab.freedesktop.org/mesa/drm/-/commit/50f8d517733d24fce6693ffae552f9833e2e6aa9
|
|
When the client doesn't support high-resolution scroll, accumulate
deltas until we can notify a discrete event.
Some mice have a free spinning wheel, making possible to lock the wheel
when the accumulator value is not 0. To avoid synchronization issues
between the mouse wheel and the accumulators, store the last delta and
when the scroll direction changes, reset the accumulator.
|
|
On newer versions of libinput, the event LIBINPUT_EVENT_POINTER_AXIS
has been deprecated in favour of LIBINPUT_EVENT_POINTER_SCROLL_WHEEL,
LIBINPUT_EVENT_POINTER_SCROLL_FINGER and
LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS.
Where new events are provided by the backend, ignore
LIBINPUT_EVENT_POINTER_AXIS, receive high-resolution scroll events from
libinput and emit the appropiate wlr_pointer signal.
|
|
Currently, the "wlr_event_pointer_axis" event stores low-resolution
values in its "delta_discrete" field. Low-resolution values are always
multiples of one, i.e., 1 for one wheel detent, 2 for two wheel
detents, etc.
In order to simplify internal handling of events, always transform in
the backend from the low-resolution value into the high-resolution
value.
The transformation is performed by multiplying by 120. The 120 magic
number is used by the kernel and it is exposed to clients in the
"WLR_POINTER_AXIS_DISCRETE_STEP" constant.
|
|
The logic doesn't support handling multiple outputs so let's not break
the assumption and handle damages per output much like how damage_ring
is done.
|