Commit graph

2555 commits

Author SHA1 Message Date
Kirill Primak
5f4a35290d util/box: always treat NULL boxes as empty 2023-05-23 21:08:22 +03:00
Simon Ser
96f3f3c92e render/pixel-format: add support for block-based formats
Some formats like sub-sampled YCbCr use a block of bytes to
store the color values for more than one pixel. Update our format
table to be able to handle such formats.
2023-05-21 20:28:45 +00:00
Simon Ser
78a1ac540e render/pixel-format: add docs 2023-05-21 20:28:45 +00:00
Manuel Stoeckl
10dd416694 render/vulkan: allow rendering to non-8-bit buffers
This is implemented by a two-subpass rendering scheme; the first
subpass draws (and blends) onto a linear R16G16B16A16_SFLOAT buffer,
while the second subpass performs linear->srgb conversion, writing
onto the actual output buffer.
2023-05-12 15:09:02 +00:00
Alexander Orzechowski
300bd80772 wlr_drm_format_set: Store formats on array 2023-05-11 18:25:52 +02:00
Alexander Orzechowski
90d08f8f1c wlr_drm_format: Rework wlr_drm_format_intersect
Now it takes a reference to a destination format
2023-05-11 18:24:43 +02:00
Alexander Orzechowski
340700cb70 wlr_drm_format: Change wlr_drm_format_dup to copy 2023-05-11 18:24:43 +02:00
Alexander Orzechowski
099a147439 wlr_drm_format: Change wlr_drm_format_create to init 2023-05-11 18:24:40 +02:00
Alexander Orzechowski
e427e019c4 wlr_drm_format: Don't take double pointer in wlr_drm_format_add 2023-05-11 03:51:01 -04:00
Alexander Orzechowski
e6879616e7 wlr_drm_format: Make structure constant length
Don't store modifiers as part of the struct.
2023-05-11 03:51:01 -04:00
Alexander Orzechowski
84d07e7119 wlr_drm_format_set: Remove redundant text in comment for finish function
This is implied by the fact that this function finishes the state instead
of destroying it.
2023-05-11 03:51:01 -04:00
Alexander Orzechowski
b45396c790 wlr_drm_format: Introduce drm_format_finish 2023-05-11 03:51:01 -04: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
Simon Ser
b03f71fe5f render/vulkan: add support for NV12 2023-05-04 20:07:20 +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
f5a5712a02 render/vulkan: use VK_KHR_synchronization2
This simplifies the vkQueueSubmit call, removing the need to pass
timeline semaphore point values as separate arrays.
2023-04-28 15:36:39 +00:00
Simon Ser
6830bfc17f render/pixman: implement render pass API 2023-04-25 17:26:35 +02:00
Simon Ser
6ce371a317 render/pixman: add begin_pixman_data_ptr_access()
This logic is used twice.
2023-04-25 17:26:35 +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
471249ae4f render/pass: add legacy render pass implementation
Add a render pass implementation which leverages the legacy
rendering API. This is helpful during the migration.
2023-04-25 17:25:10 +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
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
92b726ef67 render/vulkan: use full names for extension command fields
This makes grepping much easier.
2023-04-18 15:58:55 +00:00
Simon Ser
25d9055281 xcursor: sync with libwayland
xcursor.c was copied over from libwayland-cursor. A lot of
cosmetic imporvements have been merged upstream. Copy-paste the
new version.
2023-04-18 14:54:25 +00:00
Andri Yngvason
00489b11a0 seat: Provide dummy resources for inert seats 2023-04-18 08:29:30 +00: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
Alexander Orzechowski
b1e38fc7ea output: Drop output_is_direct_scanout 2023-04-06 22:39:08 +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
89dcecba39 backend/wayland: only unmap layers when necessary 2023-03-28 22:58:29 +00: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
Rose Hudson
37f42e2df2 backend/wayland: support touch cancel events
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
2023-03-24 11:47:08 +00:00
zccrs
5602fb1373 backend/wayland: fix undefined reference to wlr_wl_input_device_get_seat
Amend b7e9ad79 to remove wlr_wl_input_device_get_seat definition.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3611
2023-03-20 09:49:54 +08:00
Kirill Primak
a3489f2c64 xdg-shell: improve unmapping logic slightly 2023-03-12 11:09:36 +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
Kirill Primak
ad51983b23 xwm: make atom_map static 2023-03-09 18:51:47 +00:00
Simon Ser
cab47d33e2 util/log: prefix WLR_REL_SRC_DIR with underscore
Just like _WLR_FILENAME and _WLR_ATTRIB_PRINTF, this makes it more
obvious that this isn't part of our API.
2023-03-01 00:52:18 +01:00
Simon Ser
a160304289 backend/drm: use libdisplay-info for CVT mode generation 2023-02-28 14:44:02 +00:00