pub struct Surface<T: SurfaceTypeTrait> { /* private fields */ }
Expand description
A wrapper around EGLSurface
.
Implementations§
Source§impl<T: SurfaceTypeTrait> Surface<T>
impl<T: SurfaceTypeTrait> Surface<T>
Sourcepub fn swap_buffers_with_damage(
&self,
context: &PossiblyCurrentContext,
rects: &[Rect],
) -> Result<()>
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>
impl<T: SurfaceTypeTrait> AsRawSurface for Surface<T>
Source§fn raw_surface(&self) -> RawSurface
fn raw_surface(&self) -> RawSurface
Get the raw handle to the surface.
Source§impl<T: SurfaceTypeTrait> Debug for Surface<T>
impl<T: SurfaceTypeTrait> Debug for Surface<T>
Source§impl<T: SurfaceTypeTrait> Drop for Surface<T>
impl<T: SurfaceTypeTrait> Drop for Surface<T>
Source§impl<T: SurfaceTypeTrait> GetGlConfig for Surface<T>
impl<T: SurfaceTypeTrait> GetGlConfig for Surface<T>
Source§impl<T: SurfaceTypeTrait> GetGlDisplay for Surface<T>
impl<T: SurfaceTypeTrait> GetGlDisplay for Surface<T>
Source§impl<T: SurfaceTypeTrait> GlSurface<T> for Surface<T>
impl<T: SurfaceTypeTrait> GlSurface<T> for Surface<T>
Source§type Context = PossiblyCurrentContext
type Context = PossiblyCurrentContext
The context to access surface data.
Source§type SurfaceType = T
type SurfaceType = T
The type of the surface.
Source§fn buffer_age(&self) -> u32
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 moreSource§fn is_single_buffered(&self) -> bool
fn is_single_buffered(&self) -> bool
Check whether the surface is single buffered. Read more
Source§fn swap_buffers(&self, context: &Self::Context) -> Result<()>
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<()>
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
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
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
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,
)
fn resize( &self, _context: &Self::Context, width: NonZeroU32, height: NonZeroU32, )
Resize the surface to a new size. Read more
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> 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