Contents

IOSurfaceCreateMachPort(_:)

Returns a mach_port_t that holds a reference to the IOSurface.

Declaration

func IOSurfaceCreateMachPort(_ buffer: IOSurfaceRef) -> mach_port_t

Discussion

This is useful if you need to atomically or securely pass an IOSurface to another task without making the surface global to the entire system. The returned port must be deallocated with mach_port_deallocate or the equivalent.

See Also

Functions