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

backend/x11: Give X11 a real rendering loop #1894

Merged
merged 1 commit into from
Nov 2, 2019

Conversation

ascent12
Copy link
Member

@ascent12 ascent12 commented Nov 2, 2019

This is some work split out of one of my renderer v6 PRs.

Makes use of the present extension to get notified of vsync, and not require any stupid timer hacks. Also make use of the present version of ConfigureNotify, because why not?

backend/x11/output.c Outdated Show resolved Hide resolved
@emersion
Copy link
Member

emersion commented Nov 2, 2019

This sounds like a good idea.

I get a black screen when running this on Sway with WLR_BACKENDS=x11.

@ascent12
Copy link
Member Author

ascent12 commented Nov 2, 2019

I get a black screen when running this on Sway with WLR_BACKENDS=x11.

Weird. All of the wlroots examples I tried were working fine.
I'll have to look into that more.

@emersion
Copy link
Member

emersion commented Nov 2, 2019

FWIW, I get a black screen with both my updated rootston fork and sway.

Makes use of the present extension to get notified of vsync, and not
require any stupid timer hacks. Also make use of the present version of
ConfigureNotify, because why not?
@ascent12
Copy link
Member Author

ascent12 commented Nov 2, 2019

I figured it out. I was forgetting to call wlr_output_update_enabled, which wlr_output_damage pays attention to, but the naive examples do not.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and works

@emersion emersion merged commit a3c3b92 into swaywm:master Nov 2, 2019
@emersion
Copy link
Member

emersion commented Nov 2, 2019

Thanks!

@ascent12 ascent12 deleted the x11-present branch November 2, 2019 12:22
@emersion emersion mentioned this pull request Nov 26, 2020
3 tasks
emersion added a commit to emersion/wlroots that referenced this pull request Dec 22, 2020
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.

[1]: swaywm#1894
emersion added a commit to emersion/wlroots that referenced this pull request Dec 22, 2020
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.

The previous attempt at doing this [1] hit issues with EGLSurface, but
we don't use that anymore.

[1]: swaywm#1894
emersion added a commit to emersion/wlroots that referenced this pull request Dec 22, 2020
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.

The previous attempt at doing this [1] hit issues with EGLSurface, but
we don't use that anymore.

[1]: swaywm#1894
emersion added a commit that referenced this pull request Dec 27, 2020
Instead of using a timer, rely on X11 Present events and send a new
frame event when the parent compositor displays a new frame on screen.

The previous attempt at doing this [1] hit issues with EGLSurface, but
we don't use that anymore.

[1]: #1894
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

2 participants