Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Screencopy clip regions #3166

Closed
wants to merge 1 commit into from
Closed

Conversation

any1
Copy link
Contributor

@any1 any1 commented Sep 5, 2021

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 or copy_with_damage, which limits the area that gets copied in the subsequent copy or copy_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#109

Protocol 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant