metal: use manual Debug implementations
This commit is contained in:
parent
5b851efe0c
commit
88a396575c
1 changed files with 31 additions and 5 deletions
|
|
@ -67,7 +67,6 @@ pub struct MetalRenderContext {
|
|||
pub gfx: Rc<dyn GfxContext>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetalDrmDevice {
|
||||
pub backend: Rc<MetalBackend>,
|
||||
pub id: DrmDeviceId,
|
||||
|
|
@ -91,6 +90,12 @@ pub struct MetalDrmDevice {
|
|||
pub is_nvidia: bool,
|
||||
}
|
||||
|
||||
impl Debug for MetalDrmDevice {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetalDrmDevice").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl MetalDrmDevice {
|
||||
pub fn is_render_device(&self) -> bool {
|
||||
if let Some(ctx) = self.backend.ctx.get() {
|
||||
|
|
@ -189,7 +194,6 @@ impl ConnectorDisplayData {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetalConnector {
|
||||
pub id: DrmConnector,
|
||||
pub master: Rc<DrmMaster>,
|
||||
|
|
@ -240,7 +244,12 @@ pub struct MetalConnector {
|
|||
pub direct_scanout_active: Cell<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
impl Debug for MetalConnector {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetalConnnector").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MetalHardwareCursor {
|
||||
pub generation: u64,
|
||||
pub connector: Rc<MetalConnector>,
|
||||
|
|
@ -253,6 +262,13 @@ pub struct MetalHardwareCursor {
|
|||
pub have_changes: Cell<bool>,
|
||||
}
|
||||
|
||||
impl Debug for MetalHardwareCursor {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetalHardwareCursor")
|
||||
.finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl HardwareCursor for MetalHardwareCursor {
|
||||
fn set_enabled(&self, enabled: bool) {
|
||||
if self.cursor_enabled_pending.replace(enabled) != enabled {
|
||||
|
|
@ -929,7 +945,6 @@ impl Connector for MetalConnector {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetalCrtc {
|
||||
pub id: DrmCrtc,
|
||||
pub idx: usize,
|
||||
|
|
@ -946,6 +961,12 @@ pub struct MetalCrtc {
|
|||
pub mode_blob: CloneCell<Option<Rc<PropBlob>>>,
|
||||
}
|
||||
|
||||
impl Debug for MetalCrtc {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetalCrtc").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetalEncoder {
|
||||
pub id: DrmEncoder,
|
||||
|
|
@ -965,7 +986,6 @@ pub struct PlaneFormat {
|
|||
modifiers: IndexSet<Modifier>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetalPlane {
|
||||
pub id: DrmPlane,
|
||||
pub master: Rc<DrmMaster>,
|
||||
|
|
@ -993,6 +1013,12 @@ pub struct MetalPlane {
|
|||
pub fb_id: DrmProperty,
|
||||
}
|
||||
|
||||
impl Debug for MetalPlane {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetalPlane").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
fn get_connectors(
|
||||
backend: &Rc<MetalBackend>,
|
||||
dev: &Rc<MetalDrmDevice>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue