Simon Ser
93a6acae9f
output: add wlr_output_begin_render_pass()
2023-05-30 16:18:19 +00:00
Alexander Orzechowski
95062904c7
wlr_scene: Introduce wlr_scene_buffer_set_opacity
2023-05-30 15:43:29 +00:00
Alexander Orzechowski
2346b90a9f
wlr_scene: Make scene_rect_from_node public
...
This is in an effort to be more consistent with both already public
getters: wlr_scene_buffer_from_node and wlr_scene_tree_from_node
2023-05-30 15:40:41 +00:00
Alexander Orzechowski
88f80c4a7c
wlr_scene: Make scene_tree_from_node public
...
This is to allow for compositors that want to be more implicit about
how their scene is organized. Such a compositor may want to walk up
at a certain scene node to find something such as a surface to focus on.
2023-05-30 15:40:41 +00:00
Alexander Orzechowski
61c157269e
wlr_scene: Add documentation to wlr_scene_buffer_from_node
2023-05-30 15:40:41 +00:00
Simon Ser
2a1234a820
wlr-export-dmabuf-v1: handle output destroy
...
We were storing a wlr_output without listening for the destroy
event.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3646
2023-05-10 20:45:48 +00:00
Simon Ser
d933f5204b
output: drop wlr_output_cursor_set_surface
2023-05-06 13:59:05 -04:00
Simon Ser
b64e7e88bf
output: add output_cursor_set_texture()
2023-05-06 17:48:56 +00:00
Alexander Orzechowski
394accbe4a
wlr_compositer: Keep track if surface has committed a buffer before.
...
This would break if you are running with a NULL renderer.
2023-05-04 11:53:26 +02:00
Simon Ser
587852056c
output: add wlr_output_add_software_cursors_to_render_pass()
...
Same as wlr_output_render_software_cursors(), but takes a
struct wlr_render_pass.
2023-04-25 17:26:34 +02:00
Simon Ser
44069dfd5e
output-layer: add cropping support
...
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).
2023-04-20 10:39:46 +02:00
Simon Ser
dae2deb3c9
compositor: add wlr_surface_set_preferred_buffer_transform()
...
References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220
2023-04-14 17:07:26 +02:00
Simon Ser
42edd36785
compositor: add wlr_surface_set_preferred_buffer_scale()
...
References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220
2023-04-14 17:07:26 +02:00
Simon Ser
0bb574239d
compositor: pass version in wlr_compositor_create
...
This allows wlroots to support newer versions of the interface
without breaking the API.
2023-04-14 17:07:26 +02:00
Simon Ser
9ef98452a3
output-damage: drop
...
Compositors can migrate to wlr_damage_ring.
2023-04-06 20:34:30 +00:00
Simon Ser
079ff9e6fb
output: add wlr_output_is_direct_scanout_allowed()
...
This lets compositors check whether direct scan-out is possible.
Compositors will soon be responsible for manually calling this
function.
2023-04-06 21:42:08 +02:00
Simon Ser
835208db98
output-layer: add support for scaling buffers
...
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).
2023-04-04 19:39:38 +02:00
Simon Ser
e00c4cd7dc
output-layer: cache current state
...
The will be used by the Wayland backend to figure out whether
updating sub-surface position is necessary.
2023-03-28 22:58:29 +00:00
Simon Ser
1b6fac4aa6
output-layer: require all layers in wlr_output_state.layers
...
- 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
2023-03-10 11:16:01 +00:00
Simon Ser
fef8ab22e3
output: introduce wlr_output_configure_primary_swapchain()
...
The goal is to simplify wlr_output by moving all of its rendering
API into separate helpers. Here is a first step to sunset
wlr_output_attach_render(). Instead, compositors call
wlr_output_configure_primary_swapchain(), wlr_swapchain_acquire(),
wlr_renderer_begin_with_buffer() and wlr_output_attach_buffer().
Note that compositors can supply a base struct wlr_output_state.
This is useful to allocate a buffer suitable for submission with
a modeset, for instance.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3079
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3197
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3984
2023-02-24 18:22:20 +00:00
Simon Ser
3874577d3c
output-layer: document interactions with screen capture
...
When e.g. screencopy-v1 is active, callers are responsible for
disabling output layers.
2023-02-21 10:35:30 +00:00
Simon Ser
7215bd1e0f
output: expose wlr_output_state_set_buffer()
2023-02-21 09:43:43 +00:00
Simon Ser
4629d0ef40
output: expose wlr_output_state_finish()
...
Same as the original function, but check for the bitfield before
calling pixman_region32_fini(), because that function expects an
initialized region.
2023-02-21 09:43:43 +00:00
Alexander Orzechowski
3ef9f91283
wlr_scene: Add dmabuf_feedback helper
2023-02-20 17:21:17 -05:00
Alexander Orzechowski
323f0b94db
wlr_scene: Cleanup header includes
...
We don't need to pull wlr_compositor.
2023-02-20 16:53:59 -05:00
Simon Ser
849c362ffb
linux-dmabuf-v1: add helper for output layer feedback events
2023-02-20 18:38:57 +01:00
Simon Ser
e1335a792a
output-layer: add feedback event
2023-02-20 18:38:57 +01:00
Simon Ser
3e0ce761ad
output: add wlr_output_set_layers()
2023-02-20 18:38:09 +01:00
Simon Ser
2f29b0c438
Add wlr_output_layer
...
This is based on previous work [1] [2].
This new API allows compositors to display buffers without needing to
perform rendering operations. This API can be implemented on Wayland
using subsurfaces and on DRM using KMS planes.
Compared to [1], this approach leverages wlr_addon_set to let backends
attach their own private state to layers, removes the pending
state (necessary for interop with wlr_output_commit_state()) and
enum wlr_output_layer_state_field.
[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/1985
[2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3447
2023-02-20 18:38:09 +01:00
Kenny Levinsen
1225f81a6a
scene: Add fractional scale handling
2023-02-08 16:31:39 +01:00
Kenny Levinsen
efb8df8b22
wp-fractional-scale-v1: new protocol implementation
...
This implements the WIP wp-fractional-scale-v1 protocol.
2023-02-08 16:31:39 +01:00
Simon Ser
0c966f102c
linux-dmabuf-v1: add wlr_linux_dmabuf_feedback_v1_init_with_options()
2023-02-06 19:14:15 +00:00
Simon Ser
b264ec7767
linux-dmabuf-v1: add basic helpers for feedback
2023-02-06 19:14:15 +00:00
Simon Ser
5cd14dfc91
linux-dmabuf-v1: stop using const in feedback
...
Instead of using const pointers, use structs owned by the tranche.
This will allow wlroots to expose helpers to build feedback
objects.
2023-02-06 19:14:15 +00:00
Alexander Orzechowski
7b32c25a4f
wlr_scene: Rename wlr_scene_surface_from_buffer
...
This renames it to wlr_scene_surface_try_from_buffer to be more clear
that this function can return NULL. This is inline with the rest of
wlroots[1].
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
2023-02-04 02:57:42 -05:00
Simon Ser
eb3e8f08a8
subcompositor: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:14:39 +01:00
Simon Ser
c5f7f8ab98
ext-session-lock-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:14:12 +01:00
Simon Ser
f9bd416d41
layer-shell-v1: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:13:53 +01:00
Simon Ser
49cb85ad72
input-method-v2: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:13:30 +01:00
Simon Ser
711a1a3ed4
xdg-shell: convert to try_from
...
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
2023-02-01 20:12:49 +01:00
Simon Ser
0f24d27e0b
xdg-shell: rename wlr_xdg_popup.committed to sent_initial_configure
...
We made a similar change to wlr_xdg_toplevel.
2023-01-31 16:27:05 +01:00
Simon Ser
df0c926a7a
xdg-shell: rename wlr_xdg_toplevel.added to sent_initial_configure
...
This is more descriptive, and avoids the confusion with
wlr_xdg_surface.added.
2023-01-31 16:20:33 +01:00
Simon Ser
0e54b861e9
seat/keyboard: constify wlr_seat_keyboard_notify_enter()
2023-01-26 15:06:45 +00:00
Simon Ser
695d28c250
seat/keyboard: constify wlr_seat_keyboard_notify_modifiers()
2023-01-26 15:06:45 +00:00
Simon Ser
e44834595d
seat/keyboard: constify args in wlr_seat_keyboard_enter()
2023-01-26 15:06:45 +00:00
Simon Ser
12e04d8f83
seat/keyboard: constify wlr_seat_keyboard_send_modifiers()
2023-01-26 15:06:45 +00:00
Alexander Orzechowski
5007e713b4
wlr_scene: Send intersecting list of scene outputs for outputs_update signal
2023-01-21 16:23:30 -05:00
Kirill Primak
843b874f22
output-layout: improve closest point for no outputs case
...
Without outputs, all points are equally invalid anyway, but for e.g.
cursor warping it makes more sense to preserve the original position.
2023-01-21 12:48:43 +00:00
Simon Ser
e93ecc669c
tablet-tool: revert bitfield in enum wlr_tablet_tool_tip_state
...
This was changed to a bitfield by mistake.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484#note_1697926
2023-01-03 20:15:55 +00:00
Isaac Freund
869af1cfbb
session-lock: send more protocol errors
...
The invalid_destroy and invalid_unlock protocol errors aren't currently
sent by wlroots and instead left up to the compositor. However, we can
handle these as well without much additional complexity.
This also adds a missing wl_resource_destroy() call if the lock is inert
in lock_handle_unlock_and_destroy().
2022-12-23 16:56:42 +01:00