Skip to content

Commit

Permalink
Remove unnecessary abstractions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduerr committed May 4, 2024
1 parent 1509036 commit d9ab91a
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions glutin/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ use crate::surface::{
use crate::api::cgl::display::Display as CglDisplay;
#[cfg(egl_backend)]
use crate::api::egl::display::Display as EglDisplay;
#[cfg(egl_backend)]
use crate::api::egl::Egl;
#[cfg(glx_backend)]
use crate::api::glx::display::Display as GlxDisplay;
#[cfg(glx_backend)]
use crate::api::glx::{Glx, XlibErrorHookRegistrar};
use crate::api::glx::XlibErrorHookRegistrar;
#[cfg(wgl_backend)]
use crate::api::wgl::display::Display as WglDisplay;

Expand Down Expand Up @@ -257,24 +255,6 @@ impl Display {
DisplayApiPreference::Cgl => unsafe { Ok(Self::Cgl(CglDisplay::new(display)?)) },
}
}

/// Get a reference to the initialized EGL API.
#[cfg(egl_backend)]
pub fn egl(&self) -> Option<&'static Egl> {
match self {
Self::Egl(egl_display) => Some(egl_display.egl()),
_ => None,
}
}

/// Get a reference to the initialized GLX API.
#[cfg(glx_backend)]
pub fn glx(&self) -> Option<&'static Glx> {
match self {
Self::Glx(glx_display) => Some(glx_display.glx()),
_ => None,
}
}
}

impl GlDisplay for Display {
Expand Down

0 comments on commit d9ab91a

Please sign in to comment.