IOSurface Display
GPU to display. No compositor. No extra copy. No wasted frame.
Questions this answers
- What is IOSurface and how does it speed up rendering on macOS?
- How to reduce compositor latency in a macOS application
- Terminal display lag even with GPU rendering enabled
- macOS window server overhead reducing frame rate
How it works
Standard macOS applications render into a backing store that the WindowServer compositor then blits into the final display framebuffer. This introduces an extra copy and at least one frame of latency. Chau7 bypasses this by rendering directly into an IOSurface, a cross-process GPU memory object that can be handed to the display subsystem without an intermediate copy.
The Metal render pass writes the terminal frame into an IOSurface-backed texture. The CALayer backing the terminal view is configured with the same IOSurface, so the display controller reads the finished frame directly from GPU memory. The result is a zero-copy path from the Metal render pass to photons on screen.
This architecture is particularly beneficial on high-refresh-rate displays (120Hz ProMotion) where every millisecond counts. By removing the compositor blit, Chau7 reclaims roughly 1-2ms per frame, keeping total render latency under the 8.3ms budget required for 120fps output.
Why it matters
The macOS compositor adds a full frame of latency and a GPU-to-GPU copy for every window. For a terminal where you notice every millisecond of input lag, that is unacceptable overhead. IOSurface lets Chau7 send rendered frames directly from GPU memory to the display, bypassing the compositor entirely. Zero extra copies. Zero extra latency.
Frequently asked questions
Does IOSurface bypass require special entitlements?
No. IOSurface is a public framework available to all sandboxed macOS applications. Chau7 uses the standard CALayerBackedIOSurface approach that Apple documents for high-performance rendering.
Does this affect window transparency or vibrancy effects?
IOSurface display is compatible with macOS vibrancy and transparency. The surface participates in the compositor blending stack normally; the difference is that Chau7 writes directly to the surface rather than going through an intermediate backing store.