Expand description
The Metal platform contracts: what a platform exposes so that a render backend can draw with Metal.
The device and its command queue (IMetalDevice), the surface of a
top-level with its render target and the session of a frame
(IMetalPlatformSurface, IMetalPlatformSurfaceRenderTarget,
IMetalPlatformSurfaceRenderingSession), and the import of images and
shared events that were created outside of a device
(IMetalExternalObjectsFeature).
These traits belong to no render backend: the platform that has a Metal
device implements them, and each backend that draws with Metal (Skia
through Graphite, Vello through wgpu) reads them. Handles to Metal
objects are passed as raw pointers, exactly as the platform hands them
out.
Traits§
- IMetal
Device - A Metal device and the command queue used to render with it.
- IMetal
External Objects Feature - Lets a Metal device import images and shared events that were created outside of it (by another device or another process).
- IMetal
External Texture - A texture of a Metal device that was imported from an external image.
- IMetal
Platform Surface - A surface that is rendered to with Metal.
- IMetal
Platform Surface Render Target - The render target of a Metal surface.
- IMetal
Platform Surface Rendering Session - One frame being rendered to a Metal surface. Disposing the session presents the frame.
- IMetal
Shared Event - A shared event of a Metal device that was imported from a handle.
Functions§
- try_
get_ metal_ surface - The render surface viewed as a Metal surface, when it is one.