mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
wlr_scene: fix fullscreen app stuttering when screensharing
Problem: The wlroots implementation of wlr_screencopy applys a lock for a brief duration every time a frame is captured. If an output is eligible for direct scanout then this will result in direct scanout being rapidly toggled on and off since the lock count constantly flips between 0 and 1. On some hardware this causes stuttering every time direct scanout is enabled then disabled. Solution: To mitigate this we wait for there to be 0 locks for 120 frames so that we can be relatively confident that screen recording has stopped before we re-enable direct scanout.
This commit is contained in:
parent
19c5d22beb
commit
06d3d48aa2
3 changed files with 20 additions and 1 deletions
|
|
@ -341,6 +341,7 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
|||
.transform = WL_OUTPUT_TRANSFORM_NORMAL,
|
||||
.scale = 1,
|
||||
.commit_seq = 0,
|
||||
.frames_since_locked = 0,
|
||||
};
|
||||
|
||||
wl_list_init(&output->modes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue