Remove vsync detection and configurability
ClosedPublic

Authored by romangg on Aug 27 2019, 8:28 PM.

Details

Summary

Selecting not to vsync does not make sense for an X11 compositor. In the end
we want clients to be able to present async if they want to but the compositor
is supposed to send swaps with vsync to the XServer in order to not generate
tearing artifacts.

There was also a detection logic which did some questionable things in case
vsync was not available. I don't think this is necessary at all since we can
just always run a timer to present with or without vsync.

Test Plan

kwin_x11 tested on i915.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Aug 27 2019, 8:28 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 27 2019, 8:28 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 27 2019, 8:28 PM
zzag requested changes to this revision.Aug 28 2019, 5:25 PM
zzag added a subscriber: zzag.
  • Remove NoSwapEncourage as it's no longer used anywhere
  • Remove "Never" vsync option in Compositing KCM
This revision now requires changes to proceed.Aug 28 2019, 5:25 PM
zzag added a comment.Sep 5 2019, 8:59 AM

I won't object to removing "no vsync" option, however keep in mind that some people may not like it. The whole point of using a compositing window manager on X11 is to get rid of screen tearing and make windows wobbly, right?

In D23511#525855, @zzag wrote:

I won't object to removing "no vsync" option, however keep in mind that some people may not like it. The whole point of using a compositing window manager on X11 is to get rid of screen tearing and make windows wobbly, right?

The idea is that for that we don't need the "no vsync" option. Minimizing screen tearing is achieved when respecting the vsync, so why should there be an option to not do it in a window compositor?

romangg updated this revision to Diff 66535.Sep 20 2019, 10:48 AM
  • Remove NoSwapEncourage strategy
  • Remove never swap option from KCM
  • Rebase on master
zzag added inline comments.Sep 20 2019, 11:21 AM
composite.cpp
336–342

Delete this branch?

romangg added inline comments.Sep 20 2019, 11:29 AM
composite.cpp
336–342

Yea, I added an assert before anyway. I don't remember why I left the branch in and added the assert instead. Was maybe not sure about it but if you also see nothing wrong with removing the branch at the moment I'm gonna do it.

zzag added inline comments.Sep 20 2019, 4:20 PM
composite.cpp
336–342

Yes, please delete this branch.

romangg updated this revision to Diff 68578.Oct 22 2019, 11:08 PM

Rebase on master.

romangg updated this revision to Diff 68581.Oct 23 2019, 12:36 AM
romangg marked 3 inline comments as done.
  • Delete superfluous branch
This revision was not accepted when it landed; it landed in state Needs Review.Thu, Nov 14, 7:55 AM
This revision was automatically updated to reflect the committed changes.