Looking from the right ANGLE

ANGLE is Google's OpenGL ES implementation that runs on top of a native graphics API. Here its Metal backend is built from source and packaged as a deb, exposing libEGL and libGLESv2. A GLES program links against those as usual, and underneath, its draw calls become Metal.

The part that matters for this project is where ANGLE puts its results. It can render directly into IOSurfaces, so a client's frame lands in a surface the compositor already knows how to adopt as a texture; that shared surface is what removes the copy.

Zero-copy compositing

Figure 03. The zero-copy pathno CPU copy

A GTK4 window renders once, on the GPU, into its own IOSurface. iosc imports that surface as a Metal texture and blends it with the other windows into the output surface. The app then scans out that output. The same GPU that drew the window draws it to the screen, and nothing travels through the CPU on the way.

GTK4 on the A10

GTK4's modern GL renderer works through this chain on the device. The renderer realizes on an ES3 ANGLE-to-Metal context, reached through a small wayland-egl shim, and draws into IOSurfaces.

Where X11 still uses the CPU

The classic xiOS server has no hardware GLX or DRI route on iOS, so clients that connect directly to it render in software and draw into IOSurface-backed memory the app presents with Metal. X11 compatibility can still join the GPU path through Xwayland: glamor renders X pixmaps with ANGLE into IOSurfaces, then iosc composites them like any other Wayland surface. Legacy GLX desktop-GL apps stay on llvmpipe.