Simon Ser
336a3054a3
Merge branch 'github/fork/emersion/vulkan-allocator' into 'master'
...
Draft: Vulkan allocator
See merge request wlroots/wlroots!2648
2023-05-06 21:23:40 +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
5adb1be3a7
drm_format_set_intersect: Require initialized dst and remove assert
...
The usages in linux_dmabuf zero out the dst before passing it so this
change should be fine.
2023-05-04 18:19:33 +00:00
Alexander Orzechowski
1ee75786b4
drm_format_set_union: Require initialized dst and remove assert
2023-05-04 18:19:33 +00:00
novenary
d7917d2076
xwayland: allow compositor to set withdrawn state
2023-05-04 18:05:00 +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
Alexander Orzechowski
2dd9549085
drm_format_set: Mark as unstable
...
This is supposed to be an unstable interface and it was a mistake that
this header was not included.
2023-05-03 19:08:14 +02:00
Austin Shafer
ec37d55a5e
Add union function for format sets
2023-05-03 12:06:48 -04:00
Simon Ser
a93fc8afd6
render: introduce blend mode
...
Allow callers to pick the blend mode when rendering a rect. The
"none" mode can be used to disable blending and clear rects.
2023-05-02 21:32:51 +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
4a1ad32534
render: add render pass helpers
2023-04-25 17:25:10 +02:00
Simon Ser
756dedae20
Add a new renderer API
...
Goals:
- Extensibility: we need to be able to add new params to the calls
to render a texture/rect. For instance we'll need to add fences to
the render texture operation for explicit sync purposes.
- No implicit state: no more bind_buffer, begin, end.
- No matrices: these hurt Pixman and we don't need them.
- Clip regions for optimized damage repainting.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3188
2023-04-25 17:25:10 +02:00
Simon Ser
80d870ae52
render/vulkan: add Vulkan allocator
2022-12-20 14:08:39 +01:00
Simon Ser
7081687843
keyboard: improve documentation
2022-12-15 19:49:45 +00:00
xiliuya
7f6d646e0a
keyboard: only update LEDs when changed
2022-12-14 17:51:06 +01:00
Kirill Primak
8f58c060fd
util/region: forbid "shrinking" a region with wlr_region_expand()
...
The logic isn't correct.
2022-12-09 16:46:36 +00:00
Ronan Pigott
f8e70af318
wlr_xdg_activation_v1: add new_token event
2022-12-06 05:45:37 +00:00
Kirill Primak
097ea84cda
output-layout: improve API
...
- wlr_output_layout_add{,_auto}() now return a bool indicating whether
the function has succeeded.
- wlr_output_layout_move() is removed.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1083
2022-12-05 18:21:04 +00:00
Kirill Primak
27ea18cc33
output-layout: remove wlr_output_layout_output_state
...
wlroots uses "// private state" comments to denote structure fields
which shouldn't be accessed by compositors, so let's drop
wlr_output_layout_output_state and inline its fields into
wlr_output_layout_output; this also simplifies layout output creation.
2022-12-05 18:21:04 +00:00
Kirill Primak
604df8b327
output-layout: fix function decl indentation
2022-12-05 18:21:04 +00:00
Simon Ser
532f3d3c20
xwayland/xwm: replace role with addon
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
2022-12-05 18:48:15 +01:00
Simon Ser
512deebd82
compositor: add wlr_surface.events.precommit
2022-12-05 10:51:46 +01:00
Simon Ser
c4727240af
compositor: document wlr_surface_{enter,leave,send_frame_done}
2022-12-03 16:52:32 +00:00
Alexander Orzechowski
ec846adb54
wlr_drm: Add missing wlr_buffer import
2022-12-03 07:57:40 -05:00
Simon Ser
f36a5915da
wl-drm: don't store wlr_renderer
...
Query the formats at init time, then forget about the renderer.
This will allow wl_drm to be created with a list of formats instead
of a renderer, and will behave better after a GPU reset.
2022-12-02 14:27:07 +00:00
Simon Ser
c8eb24d30e
output: drop enable/mode events
...
The backend no longer changes the output state behind the
compositor's back. Instead, compositors can listen to the "commit"
event and check for WLR_OUTPUT_STATE_ENABLED/WLR_OUTPUT_STATE_MODE.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2300
2022-12-01 20:05:04 +00:00
Simon Ser
19dfe99496
output-damage: stop listening for output mode events
...
These will go away.
2022-12-01 20:05:04 +00:00
Simon Ser
fecbaa2bd6
scene: stop listening for output enable/mode events
...
These will go away.
2022-12-01 20:05:04 +00:00
Alexander Orzechowski
fe891ebd4e
output_init_render: Allow re-initialization
...
This lets the compositor call this function after the fact to replace
the renderer/allocator after a renderer context lost.
2022-12-01 10:01:35 +00:00
Alexander Orzechowski
db0e962368
wlr_texture: Expose owning renderer
2022-12-01 04:41:43 -05:00
Simon Ser
f103dc74d8
linux-dmabuf-v1: introduce wlr_linux_dmabuf_v1_create()
...
Some compositors may want to use the linux-dmabuf-v1 implementation
with a completely custom renderer. Add a function to create the
global with a default feedback.
2022-11-30 14:19:46 +01:00
Simon Ser
9c04fd2496
linux-dmabuf-v1: drop wlr_renderer field
...
This isn't used anymore.
2022-11-30 14:19:46 +01:00
Simon Ser
88493d1f7c
linux-dmabuf-v1: don't use wlr_renderer to send legacy format list
...
The wlr_renderer field will go away in a subsequent commit.
Build the legacy device list from the default feedback instead.
2022-11-30 14:19:46 +01:00
Simon Ser
d45cffb865
linux-dmabuf-v1: don't use wlr_renderer to sanity check DMA-BUFs
...
The wlr_renderer field will go away in a subsequent commit.
Instead of trying to create a texture, try to import the DMA-BUF
into the DRM device FD.
2022-11-30 14:14:07 +01:00
Simon Ser
c99c60090c
linux-dmabuf-v1: add version arg to create()
...
To be able to add support for newer versions without breaking
changes.
2022-11-30 14:14:04 +01:00
Simon Ser
444d94ef89
linux-dmabuf-v1: add "_with_renderer" suffix to create() function
...
Make it clear this is a helper consuming a wlr_renderer. We'll
add a lower-level create() function which doesn't take it in the
next commit.
2022-11-30 14:14:02 +01:00
Simon Ser
f0375eed24
backend/session: make optional
...
Some compositors are not interested in wlr_session, for instance
nested compositors.
Disabling wlr_session removes the udev dependency.
2022-11-25 16:15:29 +00:00
Simon Ser
76b3687739
shm: add create() function without a wlr_renderer
...
This allows compositors which don't use wlr_renderer to still use
wlroots' wl_shm implementation.
2022-11-25 15:16:42 +00:00
Kirill Primak
060df4c6c0
scene: introduce wlr_scene_buffer.events.outputs_update
...
This event is useful for e.g. sending the preferred buffer scale to the
client.
2022-11-24 22:28:13 +00:00
Simon Ser
42016fa262
compositor: make renderer optional
...
This is a first step towards moving texture uploading out of
wlr_compositor.
This commit allows compositors to opt-out of the texture uploading
by passing a NULL wlr_renderer. An immediate user of this is
gamescope, which currently implements a stub wlr_renderer just to
make wlr_compositor happy.
2022-11-24 21:55:24 +00:00
Simon Ser
359df5ef84
compsitor: document wlr_compositor_create()
2022-11-24 21:55:24 +00:00
Simon Ser
d47016abb2
backend/multi: stop pulling <wlr/backend/session.h>
...
Unused.
2022-11-24 21:50:28 +00:00
Simon Ser
0fa5743c26
render/gles2, render/pixman: stop pulling <wlr/backend.h>
...
No reason why the GLES2/Pixman renderers should depend on the
backend.
2022-11-24 21:50:28 +00:00
Simon Ser
b89a050e58
backend: stop pulling <wlr/backend/session.h>
...
We can just forward-declare the struct instead.
2022-11-24 21:50:28 +00:00
Simon Ser
ba13f471ea
backend/session: drop unused <libudev.h>
...
We don't actually need to pull that header here.
2022-11-24 21:50:28 +00:00
Simon Ser
99134c26b8
render: stop pulling <wlr/backend.h>
...
Let's just forward-declare struct wlr_backend instead.
We need to fixup the Vulkan renderer: it needs makedev(), which
got included by chance via <wlr/backend.h> → <wlr/backend/session.h>
→ <libudev.h>.
2022-11-24 21:50:28 +00:00
Simon Ser
4ff46e6cf9
xwayland/xwm: add support for xwayland-shell-v1
2022-11-18 15:35:20 +00:00
Simon Ser
85b37127a6
xwayland/shell: add wlr_xwayland_shell_v1_surface_from_serial()
2022-11-18 15:35:20 +00:00
Simon Ser
d19191ff6b
xwayland/server: delay non-lazy startup
...
This allows users to setup event listeners before the server is
actually started.
2022-11-18 15:35:20 +00:00