Full GPU-accelerated rendering pipeline
The entire Wayland compositor rendering pipeline now runs on the GPU with zero CPU copies in the display path.
Pipeline
scene → GLES2 (Mali-G715, GL ES 3.2) → AHardwareBuffer → ASurfaceControl → SurfaceFlinger
No CPU involvement in rendering or display. The GPU composites all surfaces, and the resulting buffer goes directly to Android's display compositor via ASurfaceTransaction_setBuffer().
What changed from v4.13.0
v4.13.0 had GPU compositing but still used CPU readback (AHardwareBuffer_lock + memcpy) for display. v4.14.0 replaces that with:
buffer_presenter.c— submits AHardwareBuffers directly to SurfaceFlinger viaASurfaceControl_createFromWindow()+ASurfaceTransaction_setBuffer()+ASurfaceTransaction_apply()- Zero CPU copy — the GPU buffer goes straight to the display without being read by the CPU
- Runtime fallback — API < 29 devices fall back to the CPU blit path automatically
- Weak symbol linkage — compiled against API 28 but uses API 29+ functions at runtime
GPU acceleration summary (Phases 1-4 complete)
| Phase | What | Impact |
|---|---|---|
| 1. GLES2 build | wlroots cross-compiles with GLES2 renderer | Foundation |
| 2. EGL init | Android EGL → GLES2 on Mali-G715 | GPU available |
| 3. AHardwareBuffer | GPU compositing via native buffer import | CPU freed from rendering |
| 4. ASurfaceControl | Zero-copy display presentation | CPU freed from display |
Upstream status
- labwc/labwc#3473 (labnag optional) — merged
- labwc/labwc#3474 (xkb secure_getenv) — merged
- labwc/labwc#3481 (renderer hooks) — closed per maintainer feedback; proper fix belongs in wlroots
- wlroots patches: GlassOnTin/wlroots@android-bionic
Tracking: #47
Full Changelog: v4.13.0...v4.14.0