metal: implement tearing
This commit is contained in:
parent
d355059ad9
commit
49f6304716
31 changed files with 726 additions and 51 deletions
|
|
@ -30,8 +30,8 @@ use {
|
|||
video::{
|
||||
connectors, drm_devices, on_connector_connected, on_connector_disconnected,
|
||||
on_graphics_initialized, on_new_connector, on_new_drm_device,
|
||||
set_direct_scanout_enabled, set_gfx_api, set_vrr_cursor_hz, set_vrr_mode, Connector,
|
||||
DrmDevice,
|
||||
set_direct_scanout_enabled, set_gfx_api, set_tearing_mode, set_vrr_cursor_hz,
|
||||
set_vrr_mode, Connector, DrmDevice,
|
||||
},
|
||||
},
|
||||
std::{cell::RefCell, io::ErrorKind, path::PathBuf, rc::Rc},
|
||||
|
|
@ -564,6 +564,11 @@ impl Output {
|
|||
c.set_vrr_cursor_hz(hz);
|
||||
}
|
||||
}
|
||||
if let Some(tearing) = &self.tearing {
|
||||
if let Some(mode) = tearing.mode {
|
||||
c.set_tearing_mode(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1034,6 +1039,11 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
|
|||
set_vrr_cursor_hz(hz);
|
||||
}
|
||||
}
|
||||
if let Some(tearing) = config.tearing {
|
||||
if let Some(mode) = tearing.mode {
|
||||
set_tearing_mode(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn create_command(exec: &Exec) -> Command {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue