Struct wgpu_hal::gles::egl::Surface

source ·
pub struct Surface {
    egl: EglContext,
    wsi: WindowSystemInterface,
    config: Config,
    pub(super) presentable: bool,
    raw_window_handle: RawWindowHandle,
    swapchain: RwLock<Option<Swapchain>>,
    srgb_kind: SrgbFrameBufferKind,
}

Fields§

§egl: EglContext§wsi: WindowSystemInterface§config: Config§presentable: bool§raw_window_handle: RawWindowHandle§swapchain: RwLock<Option<Swapchain>>§srgb_kind: SrgbFrameBufferKind

Implementations§

source§

impl Surface

source

pub(super) unsafe fn present( &self, _suf_texture: Texture, context: &AdapterContext, ) -> Result<(), SurfaceError>

source

unsafe fn unconfigure_impl( &self, device: &Device, ) -> Option<(Surface, Option<*mut c_void>)>

source

pub fn supports_srgb(&self) -> bool

Trait Implementations§

source§

impl Debug for Surface

source§

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

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

impl DynResource for Surface

source§

fn as_any(&self) -> &dyn Any

source§

fn as_any_mut(&mut self) -> &mut dyn Any

source§

impl Surface for Surface

§

type A = Api

source§

unsafe fn configure( &self, device: &Device, config: &SurfaceConfiguration, ) -> Result<(), SurfaceError>

Configure self to use device. Read more
source§

unsafe fn unconfigure(&self, device: &Device)

Unconfigure self on device. Read more
source§

unsafe fn acquire_texture( &self, _timeout_ms: Option<Duration>, _fence: &Fence, ) -> Result<Option<AcquiredSurfaceTexture<Api>>, SurfaceError>

Return the next texture to be presented by self, for the caller to draw on. Read more
source§

unsafe fn discard_texture(&self, _texture: Texture)

Relinquish an acquired texture without presenting it. Read more
source§

impl Send for Surface

source§

impl Sync for Surface

Auto Trait Implementations§

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> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<S> DynSurface for S
where S: Surface + DynResource,

source§

unsafe fn configure( &self, device: &(dyn DynDevice + 'static), config: &SurfaceConfiguration, ) -> Result<(), SurfaceError>

source§

unsafe fn unconfigure(&self, device: &(dyn DynDevice + 'static))

source§

unsafe fn acquire_texture( &self, timeout: Option<Duration>, fence: &(dyn DynFence + 'static), ) -> Result<Option<DynAcquiredSurfaceTexture>, SurfaceError>

source§

unsafe fn discard_texture(&self, texture: Box<dyn DynSurfaceTexture>)

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.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<T> WasmNotSend for T
where T: Send,

source§

impl<T> WasmNotSendSync for T

source§

impl<T> WasmNotSync for T
where T: Sync,