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§
Trait Implementations§
source§impl DynResource for Surface
impl DynResource for Surface
source§impl Surface for Surface
impl Surface for Surface
type A = Api
source§unsafe fn configure(
&self,
device: &Device,
config: &SurfaceConfiguration,
) -> Result<(), SurfaceError>
unsafe fn configure( &self, device: &Device, config: &SurfaceConfiguration, ) -> Result<(), SurfaceError>
source§unsafe fn unconfigure(&self, device: &Device)
unsafe fn unconfigure(&self, device: &Device)
source§unsafe fn acquire_texture(
&self,
_timeout_ms: Option<Duration>,
_fence: &Fence,
) -> Result<Option<AcquiredSurfaceTexture<Api>>, SurfaceError>
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 moresource§unsafe fn discard_texture(&self, _texture: Texture)
unsafe fn discard_texture(&self, _texture: Texture)
Relinquish an acquired texture without presenting it. Read more
impl Send for Surface
impl Sync for Surface
Auto Trait Implementations§
impl !Freeze for Surface
impl !RefUnwindSafe 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