pub struct MetalDevice { /* private fields */ }Expand description
A Metal device and its command queue.
Implementations§
Source§impl MetalDevice
impl MetalDevice
Sourcepub fn native(&self) -> ComPtr<IFrnMetalDevice>
pub fn native(&self) -> ComPtr<IFrnMetalDevice>
Trait Implementations§
Source§impl IMetalDevice for MetalDevice
impl IMetalDevice for MetalDevice
Source§impl IOptionalFeatureProvider for MetalDevice
impl IOptionalFeatureProvider for MetalDevice
Source§fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>
fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>
The device announces itself as a Metal device, the feature that wraps the handle of an IOSurface or of a shared event for the time of its import, and its external objects feature (the import of an IOSurface and of a shared event).
Source§impl IPlatformGraphicsContext for MetalDevice
impl IPlatformGraphicsContext for MetalDevice
Source§fn ensure_current(&self) -> Rc<dyn IDisposable>
fn ensure_current(&self) -> Rc<dyn IDisposable>
Takes the lock of the device: the UI thread and the render thread both use it, one at a time.
The device lives in the graph of the server compositor, so every caller already holds the compositor lock: the order is always the compositor lock first, then this one. Something that used the device outside the compositor would have to keep that order.
Auto Trait Implementations§
impl !Freeze for MetalDevice
impl !RefUnwindSafe for MetalDevice
impl !Send for MetalDevice
impl !Sync for MetalDevice
impl !UnwindSafe for MetalDevice
impl Unpin for MetalDevice
impl UnsafeUnpin for MetalDevice
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