We were only restoring fixed modes here. The DRM backend no longer
creates fixed modes when the compositor sets a custom mode, so we
need to handle this situation when restoring.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3698
A no-op commit should not schedule a new frame. This aligns the
headless backend with the rest of the backends.
This will be important to handle the enabled → disabled transition.
This changes the semantics of wlr_output_state. Instead of having
fields with uninitialized memory when missing from the committed
bitflag, all fields are always initialized (and maybe NULL/empty),
just like we do in wlr_surface_state. This reduces the chances of
footguns when reading a field, and removes the need to check for
the committed bitfield everywhere.
A new wlr_output_state_init() function takes care of initializing
the Pixman region.
The kernel complains when the damage exceeds the FB bounds:
[73850.448326] i915 0000:00:02.0: [drm:drm_atomic_check_only] [PLANE:31:plane 1A] invalid damage clip 0 0 2147483647 2147483647
Make the DRM backend behave like the Wayland one and allow compositors
to damage (0, 0, INT32_MAX, INT32_MAX) to repaint everything without
needing to know the exact buffer size.
Closes: https://github.com/swaywm/sway/issues/7632
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory
The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
Commit 90d08f8f1c changed the way
wlr_drm_format_intersect worked, including passing in a destination
format list. This breaks scenarios where the intersection doesn't
find any matching formats, since we still have a valid destination
format set. This changes it to only return true if more than one
matching format is present in the intersection list.
In the logic of the DRM backend in backend_destroy, wlr_backend_finish
is called first, then the outputs are destroyed and then the
display->destroy.link is removed from the list.
This commit applies the same order to the headless backend.
Add a src_box state field. Use the SRC_* KMS props in the DRM
backend, reject the layers in the Wayland backend (for now, we can
support it later via viewporter).
This allows callers to set a destination size different from the
buffer size to scale them.
The DRM backend supports this. The Wayland backend doesn't yet
(we'd need to wire up viewporter).
since wayland doesn't provide a touch id in cancel events, track what
points are active so we can cancel all of them
timestamp is also not provided - use 0 because no one's paying attention
to that anyway
Closes#3000
- Simplifies the backends
- Avoids having two ways to do the same thing: previously one could
disable a layer by either omitting it from wlr_output_state.layers,
or by passing a NULL buffer
- We can change our mind in the future: we can allow users to omit
some layers and define a meaning without breaking the API.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4017#note_1783997