Comment by torginus
3 hours ago
EGLStreams actually was(is) a pretty good API, and I think most compositors would've had a much better time if they decided to implement that on top of GBM.
To summarize the difference between the two, with EGLStreams, you just request a buffer to draw into from a pool, then once you're done, you just submit it, thereby relinquishing control of it.
With GBM, you explicitly need to manage the lifetime and access of your buffers, making sure you don't leak or accidentally write it when the GPU/driver tries to, there's no clear ownership, and you have to handle surfaces for double/triple buffering.
It's a much lower level API, and much harder for drivers and app developers to get right, which was no doubt responsible for many years of buggy Wayland compositors - in fact, basically there wasn't a single correct implementation until Valve built Gamescope/their wlroots-based KWin fork and did a bunch of driver work.
No comments yet
Contribute on Hacker News ↗