Struct gbm::Surface
[−]
[src]
pub struct Surface<'a, T: 'static> { /* fields omitted */ }
A gbm rendering surface
Methods
impl<'a, T: 'static> Surface<'a, T>
[src]
fn has_free_buffers(&self) -> bool
[src]
Return whether or not a surface has free (non-locked) buffers
Before starting a new frame, the surface must have a buffer available for rendering. Initially, a gbm surface will have a free buffer, but after one or more buffers have been locked, the application must check for a free buffer before rendering.
fn lock_front_buffer(
&'a self
) -> Result<SurfaceBufferHandle<'a, T>, FrontBufferError>
[src]
&'a self
) -> Result<SurfaceBufferHandle<'a, T>, FrontBufferError>
Lock the surface's current front buffer
Locks rendering to the surface's current front buffer and returns
a handle to the underlying BufferObject
This function must be called exactly once after calling
eglSwapBuffers
. Calling it before any eglSwapBuffer
has happened
on the surface or two or more times after eglSwapBuffers
is an
error.
If an error occurs a FrontBufferError
is returned.
Trait Implementations
impl<'a, T: 'static> AsRaw<gbm_surface> for Surface<'a, T>
[src]
fn as_raw(&self) -> *const gbm_surface
[src]
Receive a raw pointer representing this type.
impl<'a, T: 'static> FromRaw<gbm_surface> for Surface<'a, T>
[src]
unsafe fn from_raw(ffi: *mut gbm_surface) -> Self
[src]
Create a new instance of this type from a raw pointer. Read more