Skip to main content

ferroui_metal/
lib.rs

1//! The Metal platform contracts: what a platform exposes so that a render
2//! backend can draw with Metal.
3//!
4//! The device and its command queue ([`IMetalDevice`]), the surface of a
5//! top-level with its render target and the session of a frame
6//! ([`IMetalPlatformSurface`], [`IMetalPlatformSurfaceRenderTarget`],
7//! [`IMetalPlatformSurfaceRenderingSession`]), and the import of images and
8//! shared events that were created outside of a device
9//! ([`IMetalExternalObjectsFeature`]).
10//!
11//! These traits belong to no render backend: the platform that has a Metal
12//! device implements them, and each backend that draws with Metal (Skia
13//! through Graphite, Vello through `wgpu`) reads them. Handles to Metal
14//! objects are passed as raw pointers, exactly as the platform hands them
15//! out.
16
17mod i_metal_device;
18mod i_metal_external_objects_feature;
19
20pub use i_metal_device::{
21    try_get_metal_surface, IMetalDevice, IMetalPlatformSurface, IMetalPlatformSurfaceRenderTarget,
22    IMetalPlatformSurfaceRenderingSession,
23};
24pub use i_metal_external_objects_feature::{IMetalExternalObjectsFeature, IMetalExternalTexture, IMetalSharedEvent};