metal: allow configuring color space and transfer function
This commit is contained in:
parent
04f280aabe
commit
bb56efb968
38 changed files with 1365 additions and 160 deletions
|
|
@ -30,10 +30,10 @@ use {
|
|||
switch_to_vt,
|
||||
theme::{reset_colors, reset_font, reset_sizes, set_font},
|
||||
video::{
|
||||
Connector, DrmDevice, 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_tearing_mode,
|
||||
set_vrr_cursor_hz, set_vrr_mode,
|
||||
ColorSpace, Connector, DrmDevice, TransferFunction, 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_tearing_mode, set_vrr_cursor_hz, set_vrr_mode,
|
||||
},
|
||||
xwayland::set_x_scaling_mode,
|
||||
},
|
||||
|
|
@ -588,6 +588,11 @@ impl Output {
|
|||
if let Some(format) = self.format {
|
||||
c.set_format(format);
|
||||
}
|
||||
if self.color_space.is_some() || self.transfer_function.is_some() {
|
||||
let cs = self.color_space.unwrap_or(ColorSpace::DEFAULT);
|
||||
let tf = self.transfer_function.unwrap_or(TransferFunction::DEFAULT);
|
||||
c.set_colors(cs, tf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue