Kirill Primak
753f3cc4fa
compositor: add wlr_surface_role.no_object
...
This commit allows to make a role as not represented by an object,
which fixes calling role commit handlers for roles like cursor
surfaces.
Fixes: 099b9de752
2023-06-14 14:06:28 +00:00
Simon Ser
670915eeea
output: add wlr_output_state_set_layers()
2023-06-13 12:02:49 +00:00
Kirill Primak
96f1fdd113
seat: remove a TODO comment about simulating keyboard events
2023-06-12 20:54:53 +03:00
Alexander Orzechowski
05dd08afe5
scene: introduce wlr_scene_output_build_state()
2023-06-12 14:13:09 +02:00
Alexander Orzechowski
ae7bad86dd
output: introduce wlr_output_state_set_damage()
2023-06-12 14:12:47 +02:00
Simon Ser
36376e2ddf
gamma-control-v1: stop applying gamma LUTs implicitly
...
Make the compositor responsible for doing that, so that they can
properly integrate with their output commit sequence.
2023-06-08 18:47:46 +00:00
Simon Ser
ec9b79ef19
gamma-control-v1: add wlr_gamma_control_v1_send_failed_and_destroy()
2023-06-08 18:47:46 +00:00
Simon Ser
026fc6eda0
gamma-control-v1: add wlr_gamma_control_v1_apply()
2023-06-08 18:47:46 +00:00
Simon Ser
5d5cf34486
output: add wlr_output_state_set_gamma_lut()
2023-06-08 18:47:46 +00:00
Simon Ser
6e635d2fd3
gamma-control-v1: add wlr_gamma_control_manager_v1_get_control()
2023-06-08 18:47:46 +00:00
Simon Ser
70c1a57248
gamma-control-v1: introduce set_gamma event
2023-06-08 18:47:46 +00:00
Kirill Primak
1bf245e0fe
compositor: improve role-specific documentation
2023-06-08 20:03:18 +02:00
Kirill Primak
24a479a501
drag: don't set icon's role_data
...
Currently, an icon surface's role_data is set manually to a struct
wlr_drag_icon, which is hacky, incorrect (as role_data is supposed
to be the surface's role object, and drag icons don't have them), and
will be disallowed by future changes.
2023-06-08 20:03:18 +02:00
Simon Ser
544c0622fa
presentation-time: constify wlr_presentation_feedback_send_presented()
...
We don't need to mutate the event in this function.
2023-06-06 21:38:07 +00:00
Kirill Primak
4c9eb6839d
compositor: add a note about ignored input regions
2023-06-06 13:27:11 +03:00
Rose Hudson
9e8947e4d5
add render timer API
...
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.
2023-06-05 19:50:07 +00:00
Simon Ser
52b93f7eb4
output/cursor: fix scale and transform
...
Many issues here:
- wlr_output_cursor_set_buffer() takes a buffer already scaled for
the output, not a buffer with scale=1.
- wlr_output_cursor.{width,height,hotspot_x,hotspot_y} are in output
buffer coordinates.
- render_cursor_buffer() had hardcoded no-ops for scale and
transform, instead of using the cursor surface's.
Fixes: b64e7e88bf
("output: add output_cursor_set_texture()")
2023-06-02 22:33:40 +00:00
Kirill Primak
e75407fd4d
session-lock: remove unused wlr_session_lock_surface_v1.events.map
2023-06-02 23:20:05 +03:00
Kirill Primak
d086ee1b9e
compositor: remove wlr_surface_role.precommit
...
It was previously used to handle unmapping properly but is obsolete now.
2023-06-02 21:04:16 +03:00
Kirill Primak
af4181f388
drag: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
743da5c0ae
input-method: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
229abfae0c
session-lock: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
c63f3659c5
layer-shell: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
b0437fc416
xdg-shell: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
c590bb600f
subcompositor: use unified map logic
2023-06-02 17:26:18 +00:00
Kirill Primak
6b40e08148
compositor: introduce unified map logic
2023-06-02 17:26:18 +00:00
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