Commit graph

3447 commits

Author SHA1 Message Date
Victoria Brekenfeld
fa7ae2ab3c egl: Unify feature requirements
Some checks are pending
Continuous Integration / format (push) Waiting to run
Continuous Integration / clippy-check (push) Waiting to run
Continuous Integration / check-msrv (push) Blocked by required conditions
Continuous Integration / check-minimal (push) Blocked by required conditions
Continuous Integration / smithay-check-features (push) Waiting to run
Continuous Integration / smithay-tests (push) Blocked by required conditions
Continuous Integration / smallvil-check (push) Blocked by required conditions
Continuous Integration / anvil-check-features (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Blocked by required conditions
Continuous Integration / Documentation on Github Pages (push) Blocked by required conditions
2024-06-26 21:37:19 +02:00
Victoria Brekenfeld
53b692ae0b wayland/compositor: Drop unused Marker struct 2024-06-26 21:37:19 +02:00
Victoria Brekenfeld
0d78919bd1 cargo: don't use default_features 2024-06-26 21:37:19 +02:00
Christian Meissl
69b379d00a
perf: use WlWeak::is_alive instead of upgrading (#1461)
Some checks failed
Continuous Integration / format (push) Has been cancelled
Continuous Integration / clippy-check (push) Has been cancelled
Continuous Integration / smithay-check-features (push) Has been cancelled
Continuous Integration / check-msrv (push) Has been cancelled
Continuous Integration / check-minimal (push) Has been cancelled
Continuous Integration / smithay-tests (push) Has been cancelled
Continuous Integration / smallvil-check (push) Has been cancelled
Continuous Integration / anvil-check-features (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Has been cancelled
Continuous Integration / Documentation on Github Pages (push) Has been cancelled
this has been introduced in the latest wayland-rs release
and can safe a few cycles, especially for lists holding a lot
of weak resources.
2024-06-21 23:17:11 +02:00
Victoria Brekenfeld
25ba547aa0 multigpu: Share texture state
Some checks are pending
Continuous Integration / format (push) Waiting to run
Continuous Integration / clippy-check (push) Waiting to run
Continuous Integration / check-msrv (push) Blocked by required conditions
Continuous Integration / check-minimal (push) Blocked by required conditions
Continuous Integration / smithay-check-features (push) Waiting to run
Continuous Integration / smithay-tests (push) Blocked by required conditions
Continuous Integration / smallvil-check (push) Blocked by required conditions
Continuous Integration / anvil-check-features (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Blocked by required conditions
Continuous Integration / Documentation on Github Pages (push) Blocked by required conditions
2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
c30f2ec1d4 element: Make MemoryRenderBuffer threadsafe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
8202a7c795 multigpu: Require texture to be Send for soundness 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
db53c3dec7 gles: Make sharing textures across threads possible 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
265f27ce47 multigpu: Make texture store thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
bdf2905860 desktop/popup: Make accessing the popup-tree thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
9e274f87b6 renderer/gles: Insert RendererId threadsafe
The renderer id itself is valid across threads, as it may be shared by
shared EGLContexts. This doesn't make the renderer `Send` or `Sync`, but
allows multiple renderers on different threads to share textures.
2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
c4ec3fa75f compositor: Make cached_state access thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
06ad2544a0 viewporter: Make surface access thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
d669c91d26 space: Make output operations thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
e1a1768c71 renderer: Make RenderSurfaceState thread-safe 2024-06-21 16:26:59 +02:00
Victoria Brekenfeld
96bd1e160d desktop/layer: Make interactions with LayerShell thread-safe 2024-06-21 16:26:59 +02:00
Christian Meissl
234586dbea drm: keep plane formats in order
Some checks are pending
Continuous Integration / format (push) Waiting to run
Continuous Integration / clippy-check (push) Waiting to run
Continuous Integration / check-msrv (push) Blocked by required conditions
Continuous Integration / check-minimal (push) Blocked by required conditions
Continuous Integration / smithay-check-features (push) Waiting to run
Continuous Integration / smithay-tests (push) Blocked by required conditions
Continuous Integration / smallvil-check (push) Blocked by required conditions
Continuous Integration / anvil-check-features (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Blocked by required conditions
Continuous Integration / Documentation on Github Pages (push) Blocked by required conditions
2024-06-20 22:40:21 +02:00
Christian Meissl
26af6a4921 renderer: use the new FormatSet to keep formats in order 2024-06-20 22:40:21 +02:00
Christian Meissl
b7aebdbaf2 backend: introduce FormatSet 2024-06-20 22:40:21 +02:00
Christian Meissl
22f44c18b6 wayland: keep dmabuf formats in order 2024-06-20 22:40:21 +02:00
Christian Meissl
807fadb298 drm: keep renderer_formats in order of preference 2024-06-20 22:40:21 +02:00
Ian Douglas Scott
ba0c180d5c winit: Require newer wayland-client/wayland-cursor
Fixes `-Z minimial-versions` build.
2024-06-20 21:17:34 +02:00
Ian Douglas Scott
0c36306c1f winit: Mark create_window call as #[allow(deprecated)] for now 2024-06-20 21:17:34 +02:00
Ian Douglas Scott
47fe6f001d winit: Use pump_app_events instead of deprecated pump_events
Not sure if there's a better way to organize this, but this seems
generally reasonable.
2024-06-20 21:17:34 +02:00
Ian Douglas Scott
a4a2539d2a Update winit to 0.30.0 2024-06-20 21:17:34 +02:00
Ian Douglas Scott
98b4279bcb Update ash to 0.38.0 2024-06-20 21:17:34 +02:00
Ian Douglas Scott
f01bc6876f Update calloop to 0.14.0 2024-06-20 21:17:34 +02:00
Christian Meissl
74e8c4f6ce gles: clean-up on unbind
Some checks failed
Continuous Integration / format (push) Has been cancelled
Continuous Integration / clippy-check (push) Has been cancelled
Continuous Integration / smithay-check-features (push) Has been cancelled
Continuous Integration / check-msrv (push) Has been cancelled
Continuous Integration / check-minimal (push) Has been cancelled
Continuous Integration / smithay-tests (push) Has been cancelled
Continuous Integration / smallvil-check (push) Has been cancelled
Continuous Integration / anvil-check-features (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Has been cancelled
Continuous Integration / Documentation on Github Pages (push) Has been cancelled
this prevents resources from being kept
alive unnecessarily
2024-06-19 13:18:35 +02:00
Christian Meissl
b4f8120be0 gles: disable opaque short-cut for custom shaders
Some checks are pending
Continuous Integration / format (push) Waiting to run
Continuous Integration / clippy-check (push) Waiting to run
Continuous Integration / check-msrv (push) Blocked by required conditions
Continuous Integration / check-minimal (push) Blocked by required conditions
Continuous Integration / smithay-check-features (push) Waiting to run
Continuous Integration / smithay-tests (push) Blocked by required conditions
Continuous Integration / smallvil-check (push) Blocked by required conditions
Continuous Integration / anvil-check-features (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Blocked by required conditions
Continuous Integration / Documentation on Github Pages (push) Blocked by required conditions
our assumption on implicit opaque rendering might
not hold for external shaders. in this case disable the
short-cut and just use the default opaque region
logic to decide of blending should be enabled or not.
2024-06-18 12:53:06 +02:00
Ivan Molodetskikh
68a629d79a Fix new Clippy warnings 2024-06-18 11:01:14 +02:00
Ivan Molodetskikh
fe654453b0 Make input focus store f64 Logical global coords
Some checks are pending
Continuous Integration / format (push) Waiting to run
Continuous Integration / clippy-check (push) Waiting to run
Continuous Integration / check-msrv (push) Blocked by required conditions
Continuous Integration / check-minimal (push) Blocked by required conditions
Continuous Integration / smithay-check-features (push) Waiting to run
Continuous Integration / smithay-tests (push) Blocked by required conditions
Continuous Integration / smallvil-check (push) Blocked by required conditions
Continuous Integration / anvil-check-features (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Blocked by required conditions
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Blocked by required conditions
Continuous Integration / Documentation on Github Pages (push) Blocked by required conditions
Surface position in global compositor space is not required to be
rounded to logical integers. The compositor is free to put surfaces
wherever. So, do not require an integer-logical position.

Not to be confused with:

* A subsurface can only be at an integer-logical offset from its parent
  surface (for now, at least). However, this is unrelated to the
  subsurface position in the global compositor space.
* A surface buffer is (generally expected to be) at an integer
  *physical* pixel position. However, this is unrelated, and frequently
  isn't, an integer *logical* pixel position.
2024-06-17 14:04:40 +02:00
Nicolas Avrutin
cbdb17a99d Add wprs to other compositors section. 2024-06-17 14:01:03 +02:00
Christian Meissl
6169b213fb damage: simplify opaque region handling
this does a few things, first it removes some redundant rectangle subtractions.
it is sufficient to subtract it once from the damage at the end instead of multiple
times on the intermediate results. this might also result in less fragmented damage
for the shaper.

it also gets rid of the vec in vec and instead of doing implicit indexing using explicit
indexing in a (linear) single vec. this makes access a lot cheaper, especially for
subtracting opaque regions above the currently drawn element.
2024-06-11 20:05:07 +02:00
Christian Meissl
4938db810b utils: short cut subtract regions
if we subtract multiple region we might
be able to exit early if nothing is left instead
of keeping iterating unnecessarily
2024-06-11 20:05:07 +02:00
Christian Meissl
858816b2be bench: add benchmark for opaque regions 2024-06-11 20:05:07 +02:00
Christian Meissl
0a94657100 gles: reduce time spent in uploading damage rects 2024-06-11 20:05:07 +02:00
Christian Meissl
1859d4d28e renderer: forward element opaque regions
this allows to optimize drawing textures in a renderer
2024-06-11 19:48:15 +02:00
Christian Meissl
6fb7f339fd anvil: document supported env variables 2024-06-11 19:48:15 +02:00
Christian Meissl
73aaffc080 anvil: allow to disable direct scan-out 2024-06-11 19:48:15 +02:00
Christian Meissl
30efb435fb anvil: allow to disable color transform 2024-06-11 19:48:15 +02:00
PolyMeilex
e89fc8a2fb Move pointer protocol extensions logic to their corresponding modules 2024-06-11 13:15:15 +02:00
Victoria Brekenfeld
f4327306f9 xwayland: Make hook implementation-detail 2024-06-11 12:57:35 +02:00
Ivan Molodetskikh
fce66ea784 Refactor fractional-scale to store state persistently
In my compositor I always set scale for every surface as it changes
outputs and such. It is therefore convenient if the fractional scale is
always stored in Smithay and automatically sent to newly-bound
fractional scale objects. This way, I don't need to recompute it
whenever a new fractional scale object is created.
2024-06-11 12:57:05 +02:00
PolyMeilex
ae0d737926 Additional float getters for alpha_multiplier 2024-06-10 20:58:37 +02:00
Ian Douglas Scott
24e36e97a1
Multiply alpha modifier with alpha in WaylandSurfaceRenderElement (#1448)
Previously the alpha modifier was not used anywhere within Smithay. The
compositor possibly could handle the alpha value itself, but it's not
clear how to do that when using `render_elements_from_surface_tree`. Nor
is there an obvious reason not to handle this in Smithay.

The protocol leaves the exact blending space undefined. But multiplying
here seems like a correct implementation.
2024-06-07 19:03:20 +02:00
PapyElGringo
d6da83baf2
Add the wayland surface to XwaylandShell::surface_associated 2024-06-05 12:20:40 +02:00
kenoss
dfc610a65f style: Use AnvilState<BackendData> everywhere
Before this patch, `AnvilState<BackendData>`,
`AnvilState<Backend: crate::state::Backend>`, and `AnvilState<B>` are
mixed up. This patch uses `AnvilState<BackendData>` for consistency.
2024-06-04 20:19:26 +02:00
Bartłomiej Maryńczak
96af9cb50f
Implement XDG Dialog protocol (#1389)
* xdg-dialog: Implement the protocol
2024-06-03 18:41:31 +02:00
Bartłomiej Maryńczak
1696a99533
Implement wp alpha modifier v1 (#1426)
wayland.alpha_modifier: Implement v1 of alpha_modifier protocols=
2024-06-03 18:41:07 +02:00
Ian Douglas Scott
0afc33267e Check if focus is unchanged in set_data_device_focus/set_primary_focus
I wanted to change where these are called in `cosmic-comp` to workaround
an issue. But by not just calling it when keyboard focus changes, it
created a flood of `offer` events.

It would be possible to add a getter for the focus, but it seems
reasonable just to add a test here to check if it has changed. I assume
there's no problem doing noting if the focus is the same as the current
one.
2024-06-01 12:59:20 +02:00