pub struct MetalPlatformGraphics { /* private fields */ }Expand description
The Metal platform graphics of the macOS backend.
Implementations§
Source§impl MetalPlatformGraphics
impl MetalPlatformGraphics
Sourcepub fn new(
factory: &IFerroNativeFactory,
) -> Result<MetalPlatformGraphics, HResult>
pub fn new( factory: &IFerroNativeFactory, ) -> Result<MetalPlatformGraphics, HResult>
Obtains the Metal display of the native side; fails when Metal is not available.
Sourcepub fn try_create_context(&self) -> Result<Rc<MetalDevice>, HResult>
pub fn try_create_context(&self) -> Result<Rc<MetalDevice>, HResult>
Creates a Metal device; fails when the system has none.
Trait Implementations§
Source§impl IPlatformGraphics for MetalPlatformGraphics
impl IPlatformGraphics for MetalPlatformGraphics
Whether the backend renders through one context shared by all
surfaces.
Source§fn create_context(&self) -> Rc<dyn IPlatformGraphicsContext>
fn create_context(&self) -> Rc<dyn IPlatformGraphicsContext>
Creates a new graphics context.
The shared graphics context; only valid when
uses_shared_context is true.Source§fn as_feature_provider(&self) -> Option<&dyn IOptionalFeatureProvider>
fn as_feature_provider(&self) -> Option<&dyn IOptionalFeatureProvider>
Optional features of the graphics API, if the implementation provides
any.
impl Send for MetalPlatformGraphics
impl Sync for MetalPlatformGraphics
Auto Trait Implementations§
impl Freeze for MetalPlatformGraphics
impl RefUnwindSafe for MetalPlatformGraphics
impl Unpin for MetalPlatformGraphics
impl UnsafeUnpin for MetalPlatformGraphics
impl UnwindSafe for MetalPlatformGraphics
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more