Skip to content

Commit

Permalink
expose egl display in gles
Browse files Browse the repository at this point in the history
  • Loading branch information
i509VCB committed May 22, 2022
1 parent f5c2ff1 commit f643d30
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions wgpu-hal/src/gles/egl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,24 @@ pub struct Instance {
inner: Mutex<Inner>,
}

impl Instance {
pub fn raw_display(&self) -> egl::Display {
self.inner
.try_lock()
.expect("Could not lock instance. This is most-likely a deadlock.")
.egl
.display
}

/// Returns the version of the EGL display.
pub fn egl_version(&self) -> (i32, i32) {
self.inner
.try_lock()
.expect("Could not lock instance. This is most-likely a deadlock.")
.version
}
}

unsafe impl Send for Instance {}
unsafe impl Sync for Instance {}

Expand Down

0 comments on commit f643d30

Please sign in to comment.