Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive VRR support #1004

Merged
merged 4 commits into from
Nov 27, 2024
Merged

Adaptive VRR support #1004

merged 4 commits into from
Nov 27, 2024

Conversation

Drakulix
Copy link
Member

Draft until cosmic-randr and cosmic-settings are ready

src/utils/prelude.rs Outdated Show resolved Hide resolved
@Drakulix Drakulix force-pushed the vrr branch 2 times, most recently from 0f168b4 to 11ba699 Compare November 20, 2024 17:09
@Drakulix
Copy link
Member Author

Drakulix commented Nov 20, 2024

Now only blocked on smithay.

@Drakulix Drakulix marked this pull request as ready for review November 25, 2024 18:41
Copy link
Member

@ids1024 ids1024 left a comment

Choose a reason for hiding this comment

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

I'm not sure how best to test that VRR is actually working, but the changes here look good.


pub fn use_adaptive_sync(&mut self, vrr: AdaptiveSync) -> Result<bool> {
if vrr != AdaptiveSync::Disabled {
let (tx, rx) = std::sync::mpsc::sync_channel(1);
Copy link
Member

Choose a reason for hiding this comment

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

I wish std had a oneshot channel, but I guess it's not worth adding a dependency for it when it's not already in the dependency tree.

Comment on lines +107 to +113
pub enum AdaptiveSync {
#[serde(rename = "true")]
Enabled,
#[serde(rename = "false")]
Disabled,
Force,
}
Copy link
Member

Choose a reason for hiding this comment

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

It seems a little odd to use a different terminology (enabled/force vs automatic/always) from the protocol, though it doesn't really matter that much.

@Drakulix Drakulix merged commit 81b9fb1 into master Nov 27, 2024
7 checks passed
@Drakulix Drakulix deleted the vrr branch November 27, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants