parent
de3dfacee0
commit
6d76d1c1a2
|
@ -60,6 +60,7 @@ pub struct AtomicDrmDevice<A: AsRawFd + 'static> {
|
|||
logger: ::slog::Logger,
|
||||
}
|
||||
|
||||
// DeviceHandler does not implement Debug, so we have to impl Debug manually
|
||||
impl<A: AsRawFd + fmt::Debug + 'static> fmt::Debug for AtomicDrmDevice<A> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut debug = f.debug_struct("AtomicDrmDevice");
|
||||
|
@ -92,6 +93,7 @@ type Mapping = (
|
|||
HashMap<plane::Handle, HashMap<String, property::Handle>>,
|
||||
);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(in crate::backend::drm) struct Dev<A: AsRawFd + 'static> {
|
||||
fd: A,
|
||||
privileged: bool,
|
||||
|
@ -101,19 +103,6 @@ pub(in crate::backend::drm) struct Dev<A: AsRawFd + 'static> {
|
|||
logger: ::slog::Logger,
|
||||
}
|
||||
|
||||
impl<A: AsRawFd + fmt::Debug + 'static> fmt::Debug for Dev<A> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Dev")
|
||||
.field("fd", &self.fd)
|
||||
.field("privileged", &self.privileged)
|
||||
.field("active", &self.active)
|
||||
.field("old_state", &self.old_state)
|
||||
.field("prop_mapping", &self.prop_mapping)
|
||||
.field("logger", &self.logger)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<A: AsRawFd + 'static> AsRawFd for Dev<A> {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.fd.as_raw_fd()
|
||||
|
|
|
@ -7,7 +7,6 @@ use drm::control::{
|
|||
use drm::Device as BasicDevice;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::fmt;
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::sync::{atomic::Ordering, Arc, Mutex, RwLock};
|
||||
|
||||
|
@ -37,6 +36,7 @@ pub struct Planes {
|
|||
pub cursor: plane::Handle,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(in crate::backend::drm) struct AtomicDrmSurfaceInternal<A: AsRawFd + 'static> {
|
||||
pub(super) dev: Arc<Dev<A>>,
|
||||
pub(in crate::backend::drm) crtc: crtc::Handle,
|
||||
|
@ -48,21 +48,6 @@ pub(in crate::backend::drm) struct AtomicDrmSurfaceInternal<A: AsRawFd + 'static
|
|||
pub(super) test_buffer: Mutex<Option<(DumbBuffer, framebuffer::Handle)>>,
|
||||
}
|
||||
|
||||
impl<A: AsRawFd + fmt::Debug + 'static> fmt::Debug for AtomicDrmSurfaceInternal<A> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("AtomicDrmSurfaceInternal")
|
||||
.field("dev", &self.dev)
|
||||
.field("crtc", &self.crtc)
|
||||
.field("cursor", &self.cursor)
|
||||
.field("planse", &self.planes)
|
||||
.field("state", &self.state)
|
||||
.field("pending", &self.pending)
|
||||
.field("logger", &self.logger)
|
||||
.field("test_buffer", &self.test_buffer)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<A: AsRawFd + 'static> AsRawFd for AtomicDrmSurfaceInternal<A> {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.dev.as_raw_fd()
|
||||
|
|
|
@ -50,6 +50,7 @@ pub enum FallbackDevice<D1: Device + 'static, D2: Device + 'static> {
|
|||
Fallback(D2),
|
||||
}
|
||||
|
||||
// Device is a trait, so we have to impl Debug manually
|
||||
impl<D1: Device + 'static, D2: Device + 'static> fmt::Debug for FallbackDevice<D1, D2> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
@ -152,6 +153,7 @@ pub enum FallbackSurface<S1: Surface, S2: Surface> {
|
|||
Fallback(S2),
|
||||
}
|
||||
|
||||
// Surface is a trait, so we have to impl Debug manually
|
||||
impl<S1: Surface, S2: Surface> fmt::Debug for FallbackSurface<S1, S2> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
|
|
@ -70,6 +70,7 @@ where
|
|||
links: Vec<crate::signaling::SignalToken>,
|
||||
}
|
||||
|
||||
// BackendRef does not implement debug, so we have to impl Debug manually
|
||||
impl<B, D> fmt::Debug for EglDevice<B, D>
|
||||
where
|
||||
B: Backend<Surface = <D as Device>::Surface, Error = <<D as Device>::Surface as Surface>::Error>
|
||||
|
|
|
@ -91,6 +91,7 @@ pub struct EglStreamDevice<D: RawDevice + ControlDevice + 'static> {
|
|||
links: Vec<crate::signaling::SignalToken>,
|
||||
}
|
||||
|
||||
// SurfaceInternalRef does not implement debug, so we have to impl Debug manually
|
||||
impl<D: RawDevice + ControlDevice + fmt::Debug + 'static> fmt::Debug for EglStreamDevice<D> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut debug = f.debug_struct("EglStreamDevice");
|
||||
|
|
|
@ -457,6 +457,7 @@ pub struct EGLBufferReader {
|
|||
gl: gl_ffi::Gles2,
|
||||
}
|
||||
|
||||
// Gles2 does not implement debug, so we have to impl Debug manually
|
||||
#[cfg(feature = "use_system_lib")]
|
||||
impl fmt::Debug for EGLBufferReader {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
|
|
@ -269,6 +269,7 @@ pub struct EGLImages {
|
|||
gl: gl_ffi::Gles2,
|
||||
}
|
||||
|
||||
// Gles2 does not implement debug, so we have to impl Debug manually
|
||||
#[cfg(feature = "wayland_frontend")]
|
||||
impl fmt::Debug for EGLImages {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
|
|
@ -23,6 +23,7 @@ pub struct GliumGraphicsBackend<T: GLGraphicsBackend> {
|
|||
error_channel: Rc<Cell<Option<Box<dyn std::error::Error>>>>,
|
||||
}
|
||||
|
||||
// GLGraphicsBackend is a trait, so we have to impl Debug manually
|
||||
impl<T: GLGraphicsBackend> fmt::Debug for GliumGraphicsBackend<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
struct BackendDebug<'a, T: GLGraphicsBackend>(&'a Rc<InternalBackend<T>>);
|
||||
|
|
|
@ -427,6 +427,7 @@ impl From<event::pointer::ButtonState> for backend::MouseButtonState {
|
|||
#[cfg(feature = "backend_session")]
|
||||
pub struct LibinputSessionInterface<S: Session>(S);
|
||||
|
||||
// Session is a trait, so we have to impl Debug manually
|
||||
#[cfg(feature = "backend_session")]
|
||||
impl<S: Session> fmt::Debug for LibinputSessionInterface<S> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
|
|
|
@ -71,6 +71,7 @@ struct LogindSessionImpl {
|
|||
logger: ::slog::Logger,
|
||||
}
|
||||
|
||||
// DBusConnection does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for LogindSessionImpl {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("LogindSessionImpl ")
|
||||
|
|
|
@ -63,6 +63,7 @@ pub struct UdevBackend {
|
|||
logger: ::slog::Logger,
|
||||
}
|
||||
|
||||
// MonitorSocket does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for UdevBackend {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
use udev::AsRaw;
|
||||
|
|
|
@ -66,6 +66,7 @@ enum Window {
|
|||
},
|
||||
}
|
||||
|
||||
// WlEglSurface does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for Window {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
|
|
@ -111,6 +111,7 @@ struct SignalInner<S> {
|
|||
pending_events: RefCell<VecDeque<S>>,
|
||||
}
|
||||
|
||||
// WeakCallback does not implement debug, so we have to impl Debug manually
|
||||
impl<S: fmt::Debug> fmt::Debug for SignalInner<S> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SignalInner")
|
||||
|
|
|
@ -172,6 +172,7 @@ pub struct SurfaceAttributes {
|
|||
pub user_data: UserDataMap,
|
||||
}
|
||||
|
||||
// UserDataMap does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for SurfaceAttributes {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SurfaceAttributes")
|
||||
|
|
|
@ -120,6 +120,7 @@ struct KbdInternal {
|
|||
focus_hook: Box<dyn FnMut(Option<&WlSurface>)>,
|
||||
}
|
||||
|
||||
// focus_hook does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for KbdInternal {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("KbdInternal")
|
||||
|
|
|
@ -74,6 +74,7 @@ pub(crate) struct SeatRc {
|
|||
name: String,
|
||||
}
|
||||
|
||||
// UserDataMap does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for SeatRc {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SeatRc")
|
||||
|
|
|
@ -35,6 +35,7 @@ enum GrabStatus {
|
|||
Borrowed,
|
||||
}
|
||||
|
||||
// PointerGrab is a trait, so we have to impl Debug manually
|
||||
impl fmt::Debug for GrabStatus {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
@ -55,6 +56,7 @@ struct PointerInternal {
|
|||
image_callback: Box<dyn FnMut(CursorImageStatus)>,
|
||||
}
|
||||
|
||||
// image_callback does not implement debug, so we have to impl Debug manually
|
||||
impl fmt::Debug for PointerInternal {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Point")
|
||||
|
|
Loading…
Reference in New Issue