Commit graph

18 commits

Author SHA1 Message Date
tinyboxvk
1a6dd845a2 Fix typos
Signed-off-by: tinyboxvk <13696594+tinyboxvk@users.noreply.github.com>
2025-01-09 06:59:57 +00:00
Ricardo Steijn
8f940358e4
tearing: avoid permanent disable due to rejected commits (#2295)
Currently, the cursor plane does not allow async page flips which causes tearing page flips to be rejected if the cursor was moved.

However, in games where no cursor image is present, the async page flips can still work as expected.

Instead of permanently disabling tearing after too many failures, test the output state first before each frame to see if we can commit with tearing_page_flip set to true.
2024-11-03 21:05:46 +00:00
John Lindgren
7912665b0f output: remove ported wlr_output functions
We have several wlr_output_* functions which are just wrappers around
corresponding wlr_output_state_* functions and don't actually touch the
wlr_output itself. These probably made some sense historically, but IMHO
they are just confusing now. So remove them and call wlr_output_state_*
directly.

Rename wlr_output_commit() (still useful) to output_state_commit().
2024-10-29 21:39:19 +00:00
Consolatis
6a1ecd6b7d scene-helpers: use pending_commit_damage, chases wlr!4253
Using the output damage_ring for early out will break VRR in
direct scanout mode. The reason being that the damage_ring
will be completely ignored in that mode so we need to check
`output->pending_commit_damage` instead. This matches with
what wlroots has been doing since [0] and it was missed in
the initial port to wlroots 0.18.x.

However, that would then break the magnifier which only adds
its damage to the damage ring. After some discussion with
the wlroots devs we came up with a solution that should work
for both, wlroots 0.18.0 and when [1] is backported to 0.18.1.

Note that even with this PR, VRR in direct scanout mode is
broken in 0.18.0 from the wlroots side and will be fixed once
[1] is backported to the 0.18 branch and 0.18.1 is released.

Fixes: #2078

[0] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4753
2024-08-15 20:51:20 +01:00
Consolatis
36b0dc2db4 chase: output->pending
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4202
2024-07-17 21:28:59 +01:00
Consolatis
6becc02ca4 chase: let wlr_scene track damage again
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253
2024-07-17 21:28:59 +01:00
Consolatis
45b197b8a4 magnifier: fix flickering on simultaneous gamma changes
Gamma changes take another code path and thus did not
render the magnifier. This patch consalidates both
code paths and therefore also renders the magnifier on
gamma changes.

Fixes: #1905
2024-06-29 23:36:41 +02:00
tokyo4j
48742163fd magnifier: fix high CPU usage even with magnifier disabled
Fixes the high CPU usage issue reported by @droc12345.

Changing `last_mag != is_magnify_on()` to `last_mag == is_magnify_on()`
works fine, but this check isn't needed in the first place because
magnifier state changes call `wlr_output_schedule_frame()`, which sets
`wlr_output->needs_frame`.

Also added a FIXME comment regarding the performance issue when the
magnifier is enabled.
2024-05-21 17:41:01 +02:00
Simon Long
8ba066a1a5
Add screen magnifier
This adds a screen magnifier which can be controlled with the
`ZoomIn` / `ZoomOut` and `ToggleMagnify` actions.

It scales up part of the rendered framebuffer so the magnification
may end up looking blurry depending on the magnification scale.

PR #1774
2024-05-16 00:07:23 +02:00
Consolatis
c9de358075 output: ensure we don't run into an assert() on VT switch
Also reduce log spam from failed output commits that
can happen for various reasons outside of our control.

Fixes: #1667
2024-04-08 21:14:47 +01:00
nullableVoidPtr
41891209fc chase: use wlroots tree node getters 2023-12-03 18:24:26 +00:00
Consolatis
ddc9047a67 Restore nested resize
Chases: 756ecf8ee9f1e75bc7b8297dc84f97c7d699174b
backend/wayland: use request_state when toplevel is resized

Chases: 3ef68a484243555b020200c6f95246d994932c3f
backend/x11: use request_state when window is resized

Ref: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2693

We now delay requested resolution changes by the backend until
the next frame event which causes us to render the new content
on the already enlarged buffer. Before this change, an empty
(black) buffer would have been shown instead before the next
frame event caused a new render of the actual contents.

Keep commiting the new state and then scheduling a frame event
would not help as due to the commit call it would still show an
empty buffer in the meantime.

Just modifying wlr_output->pending wouldn't work either because
wlr_scene_output_commit() *completely* ignores it (and it will
be removed in future wlroots commits). For this reason we move
to wlr_scene_output_build_state() directly because it allows us
to supply the current wlr_output->pending state and thus apply
any resolution change in lockstep with new rendering. Result:
No more flickering in the wayland backend and resizing is again
smooth as butter.

This prevents constant flicker while resizing
when running nested via the wayland backend.

For the X11 backend (can be tested via `WLR_BACKENDS=x11 labwc`),
it is still rather janky but at least doesn't cause endless self-
resizing anymore.
2023-11-27 21:01:53 +00:00
John Lindgren
404fabec92 Chase wlroots: wlr_scene_surface_from_buffer renamed
Chases: 7b32c25a4fbdcde4197a06c8e0ff638c54753bd7
wlr_scene: Rename wlr_scene_surface_from_buffer
2023-11-27 21:01:53 +00:00
Consolatis
82e9e866ec Enable more compiler warnings 2023-02-01 10:42:22 +01:00
Consolatis
15a5b710db alt-tab preview: restore functionality after move to scene-graph 2022-08-28 20:40:36 +02:00
Consolatis
efd9155513 Chase wlroots: children are now only availabe in tree nodes
Chases wlroots 71f8a48d380701de1e3331d53d470bd76f5f643b
wlr_scene: Move children list from wlr_scene_node to wlr_scene_tree
2022-06-07 07:13:37 +01:00
Consolatis
163179dda1 Chase wlroots: wlr_scene_surface
To update the wlroots subproject use
meson subprojects update wlroots
2022-05-26 06:48:00 +01:00
Consolatis
5862b65f89 Convert SSD to scene nodes 2022-02-23 21:47:01 +00:00