metal: allow configuring framebuffer formats
This commit is contained in:
parent
9bab4f7ce1
commit
b4ca15fec0
24 changed files with 713 additions and 58 deletions
|
|
@ -25,7 +25,7 @@ use {
|
|||
timer::Timer,
|
||||
video::{
|
||||
connector_type::{ConnectorType, CON_UNKNOWN},
|
||||
Connector, DrmDevice, GfxApi, Mode, TearingMode, Transform, VrrMode,
|
||||
Connector, DrmDevice, Format, GfxApi, Mode, TearingMode, Transform, VrrMode,
|
||||
},
|
||||
Axis, Direction, ModifiedKeySym, PciId, Workspace,
|
||||
},
|
||||
|
|
@ -754,6 +754,10 @@ impl Client {
|
|||
self.send(&ClientMessage::ConnectorSetScale { connector, scale });
|
||||
}
|
||||
|
||||
pub fn connector_set_format(&self, connector: Connector, format: Format) {
|
||||
self.send(&ClientMessage::ConnectorSetFormat { connector, format });
|
||||
}
|
||||
|
||||
pub fn connector_get_scale(&self, connector: Connector) -> f64 {
|
||||
let res = self.send_with_response(&ClientMessage::ConnectorGetScale { connector });
|
||||
get_response!(res, 1.0, ConnectorGetScale { scale });
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ use {
|
|||
theme::{colors::Colorable, sized::Resizable, Color},
|
||||
timer::Timer,
|
||||
video::{
|
||||
connector_type::ConnectorType, Connector, DrmDevice, GfxApi, TearingMode, Transform,
|
||||
VrrMode,
|
||||
connector_type::ConnectorType, Connector, DrmDevice, Format, GfxApi, TearingMode,
|
||||
Transform, VrrMode,
|
||||
},
|
||||
Axis, Direction, PciId, Workspace,
|
||||
_private::{PollableId, WireMode},
|
||||
|
|
@ -509,6 +509,10 @@ pub enum ClientMessage<'a> {
|
|||
SetEiSocketEnabled {
|
||||
enabled: bool,
|
||||
},
|
||||
ConnectorSetFormat {
|
||||
connector: Connector,
|
||||
format: Format,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue