This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces clip regions into the screencopy protocol. This reduces copying when only a small region on the screen is changing. The client can set a clip region on the frame object before calling
copy
orcopy_with_damage
, which limits the area that gets copied in the subsequentcopy
orcopy_with_damage
request.Typically, the client would use this in combination with
copy_with_damage
and buffer damage tracking on the client's side. I've implemented such a mechanism here: any1/wayvnc#109Protocol PR is here: swaywm/wlr-protocols#106
I've done some preliminary tests, which appear promising. The following screenshots show some performance figures for a headless sway session with output resolution of 1080p running a floating instance of
weston-simple-egl
in the middle of the screen.Without clip regions, wayvnc captures around 54 frames per second, sway's CPU load is circa 9.8% and the global GPU load circa 8.9%.
With clip regions, wayvnc captures around 57.5 frames per second, sway's CPU load is circa 7.2% and the global GPU load circa 4.9%.
I have not tested how this affects dmabuf copies yet.
Cc @cyanreg, @ammen99