Struct glutin::api::egl::surface::Surface

source ·
pub struct Surface<T: SurfaceTypeTrait> { /* private fields */ }
Available on egl_backend only.
Expand description

A wrapper around EGLSurface.

Implementations§

source§

impl<T: SurfaceTypeTrait> Surface<T>

source

pub fn swap_buffers_with_damage( &self, context: &PossiblyCurrentContext, rects: &[Rect], ) -> Result<()>

Swaps the underlying back buffers when the surface is not single buffered and pass the Rect information to the system compositor. Providing empty slice will damage the entire surface.

When the underlying extensions are not supported the function acts like Self::swap_buffers.

This Api doesn’t do any partial rendering, it just provides hints for the system compositor.

Trait Implementations§

source§

impl<T: SurfaceTypeTrait> AsRawSurface for Surface<T>

source§

fn raw_surface(&self) -> RawSurface

Get the raw handle to the surface.
source§

impl<T: SurfaceTypeTrait> Debug for Surface<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: SurfaceTypeTrait> Drop for Surface<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: SurfaceTypeTrait> GetGlConfig for Surface<T>

§

type Target = Config

The config type.
source§

fn config(&self) -> Self::Target

Get the GL config used to create a particular GL object.
source§

impl<T: SurfaceTypeTrait> GetGlDisplay for Surface<T>

§

type Target = Display

The display used by the object.
source§

fn display(&self) -> Self::Target

Obtain the GL display used to create a particular GL object.
source§

impl<T: SurfaceTypeTrait> GlSurface<T> for Surface<T>

§

type Context = PossiblyCurrentContext

The context to access surface data.
§

type SurfaceType = T

The type of the surface.
source§

fn buffer_age(&self) -> u32

The age of the back buffer of that surface. The 0 indicates that the buffer is either a new one or we failed to get the information about its age. In both cases you must redraw the entire buffer. Read more
source§

fn width(&self) -> Option<u32>

The physical width of the underlying surface.
source§

fn height(&self) -> Option<u32>

The physical height of the underlying surface. Read more
source§

fn is_single_buffered(&self) -> bool

Check whether the surface is single buffered. Read more
source§

fn swap_buffers(&self, context: &Self::Context) -> Result<()>

Swaps the underlying back buffers when the surface is not single buffered.
source§

fn set_swap_interval( &self, context: &Self::Context, interval: SwapInterval, ) -> Result<()>

Set swap interval for the surface. Read more
source§

fn is_current(&self, context: &Self::Context) -> bool

Check whether the surface is current on to the current thread.
source§

fn is_current_draw(&self, context: &Self::Context) -> bool

Check whether the surface is the current draw surface to the current thread.
source§

fn is_current_read(&self, context: &Self::Context) -> bool

Check whether the surface is the current read surface to the current thread.
source§

fn resize( &self, _context: &Self::Context, width: NonZeroU32, height: NonZeroU32, )

Resize the surface to a new size. Read more
source§

impl<T: SurfaceTypeTrait> Send for Surface<T>

Auto Trait Implementations§

§

impl<T> Freeze for Surface<T>

§

impl<T> RefUnwindSafe for Surface<T>
where T: RefUnwindSafe,

§

impl<T> !Sync for Surface<T>

§

impl<T> Unpin for Surface<T>
where T: Unpin,

§

impl<T> UnwindSafe for Surface<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.