metal: implement tearing
This commit is contained in:
parent
d355059ad9
commit
49f6304716
31 changed files with 726 additions and 51 deletions
|
|
@ -25,7 +25,7 @@ use {
|
|||
timer::Timer,
|
||||
video::{
|
||||
connector_type::{ConnectorType, CON_UNKNOWN},
|
||||
Connector, DrmDevice, GfxApi, Mode, Transform, VrrMode,
|
||||
Connector, DrmDevice, GfxApi, Mode, TearingMode, Transform, VrrMode,
|
||||
},
|
||||
Axis, Direction, ModifiedKeySym, PciId, Workspace,
|
||||
},
|
||||
|
|
@ -808,6 +808,10 @@ impl Client {
|
|||
self.send(&ClientMessage::SetVrrCursorHz { connector, hz })
|
||||
}
|
||||
|
||||
pub fn set_tearing_mode(&self, connector: Option<Connector>, mode: TearingMode) {
|
||||
self.send(&ClientMessage::SetTearingMode { connector, mode })
|
||||
}
|
||||
|
||||
pub fn drm_devices(&self) -> Vec<DrmDevice> {
|
||||
let res = self.send_with_response(&ClientMessage::GetDrmDevices);
|
||||
get_response!(res, vec![], GetDrmDevices { devices });
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ use {
|
|||
logging::LogLevel,
|
||||
theme::{colors::Colorable, sized::Resizable, Color},
|
||||
timer::Timer,
|
||||
video::{connector_type::ConnectorType, Connector, DrmDevice, GfxApi, Transform, VrrMode},
|
||||
video::{
|
||||
connector_type::ConnectorType, Connector, DrmDevice, GfxApi, TearingMode, Transform,
|
||||
VrrMode,
|
||||
},
|
||||
Axis, Direction, PciId, Workspace,
|
||||
_private::{PollableId, WireMode},
|
||||
},
|
||||
|
|
@ -495,6 +498,10 @@ pub enum ClientMessage<'a> {
|
|||
connector: Option<Connector>,
|
||||
hz: f64,
|
||||
},
|
||||
SetTearingMode {
|
||||
connector: Option<Connector>,
|
||||
mode: TearingMode,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue