pub struct Surface { /* private fields */ }Expand description
[EGL 1.0] RAII wrapper for
EGLSurface.
When dropped, frees up the surface with eglDestroySurface call.
Note that the surface would not be immediately freed if it is current to any thread. In such a case, the surface will be freed when it is no longer used.
Implementations§
Source§impl Surface
impl Surface
Sourcepub fn from_handle(
display_handle: EGLDisplay,
surface_handle: EGLSurface,
) -> Surface
pub fn from_handle( display_handle: EGLDisplay, surface_handle: EGLSurface, ) -> Surface
Create a Surface from an existing EGL display and surface handles.
Sourcepub fn handle(&self) -> EGLSurface
pub fn handle(&self) -> EGLSurface
Get raw handle.
Sourcepub fn query_width(&self) -> Result<i32>
pub fn query_width(&self) -> Result<i32>
[EGL 1.0] Returns the width of the surface in pixels.
Result of eglQuerySurface with EGL_WIDTH parameter.
Sourcepub fn query_height(&self) -> Result<i32>
pub fn query_height(&self) -> Result<i32>
[EGL 1.0] Returns the height of the surface in pixels.
Result of eglQuerySurface with EGL_HEIGHT parameter.
Sourcepub fn forget(self) -> EGLSurface
pub fn forget(self) -> EGLSurface
Drops Surface without cleaning up any resources.
Returns EGLSurface handle.
Alias for Into<egl::EGLSurface>.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl !Send for Surface
impl !Sync for Surface
impl Unpin for Surface
impl UnwindSafe for Surface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more