mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-13 08:22:16 -04:00
ext-image-capture-source/output: don't lock direct scanout while capturing
The lock_attach_render call in output_source_start() disables direct scanout for the entire duration of an ext-image-copy-capture session. This forces the compositor to perform composited rendering on every frame, which causes visible stuttering in fullscreen applications (e.g. games running via XWayland/DXVK). Unlike wlr-screencopy, ext-image-copy-capture receives the committed buffer via output_event_commit (event->state->buffer), which is valid regardless of whether direct scanout is active. The render lock is therefore unnecessary for this protocol. When cursors are requested, lock_software_cursors already implicitly prevents direct scanout whenever the cursor is visible, ensuring cursors appear correctly in the captured output. Refs: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3953
This commit is contained in:
parent
35c35530a3
commit
af521c0703
1 changed files with 0 additions and 2 deletions
|
|
@ -50,7 +50,6 @@ static void output_source_start(struct wlr_ext_image_capture_source_v1 *base,
|
||||||
if (source->num_started > 1) {
|
if (source->num_started > 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wlr_output_lock_attach_render(source->output, true);
|
|
||||||
if (with_cursors) {
|
if (with_cursors) {
|
||||||
wlr_output_lock_software_cursors(source->output, true);
|
wlr_output_lock_software_cursors(source->output, true);
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +63,6 @@ static void output_source_stop(struct wlr_ext_image_capture_source_v1 *base) {
|
||||||
if (source->num_started > 0) {
|
if (source->num_started > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wlr_output_lock_attach_render(source->output, false);
|
|
||||||
if (source->software_cursors_locked) {
|
if (source->software_cursors_locked) {
|
||||||
wlr_output_lock_software_cursors(source->output, false);
|
wlr_output_lock_software_cursors(source->output, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue