pub struct Surface {
pub(crate) presentation: Mutex<Option<Presentation>>,
pub surface_per_backend: HashMap<Backend, Box<dyn DynSurface>>,
}Fields§
§presentation: Mutex<Option<Presentation>>§surface_per_backend: HashMap<Backend, Box<dyn DynSurface>>Implementations§
Source§impl Surface
impl Surface
pub fn get_capabilities( &self, adapter: &Adapter, ) -> Result<SurfaceCapabilities, GetSurfaceSupportError>
pub fn get_capabilities_with_raw( &self, adapter: &DynExposedAdapter, ) -> Result<SurfaceCapabilities, GetSurfaceSupportError>
Sourcepub fn display_hdr_info(&self, adapter: &Adapter) -> DisplayHdrInfo
pub fn display_hdr_info(&self, adapter: &Adapter) -> DisplayHdrInfo
Returns the HDR / luminance characteristics of the display backing this
surface on adapter.
Falls back to wgt::DisplayHdrInfo::default (all fields None) when the
surface is not on adapter’s backend or the backend reports nothing.
pub fn display_hdr_info_with_raw( &self, adapter: &DynExposedAdapter, ) -> DisplayHdrInfo
pub fn raw(&self, backend: Backend) -> Option<&dyn DynSurface>
Source§impl Surface
impl Surface
pub fn get_current_texture(&self) -> Result<ResolvedSurfaceOutput, SurfaceError>
pub fn present(&self) -> Result<Status, SurfaceError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Surface
impl !RefUnwindSafe for Surface
impl Send for Surface
impl Sync 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more