freedesktop.wayland-egl
#includelibwayland-egl 1.26.0 — wl_egl_window, the bridge from a wl_surface to an EGL window surface
#include <wayland-egl.h>
mcpp add freedesktop.wayland-egl@1.26.0
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// freedesktop.wayland-egl — the step that used to be missing.
//
// WHAT THIS CAN AND CANNOT ASSERT, decided by what the library actually is.
//
// libwayland-egl is 118 lines and holds no connection: `wl_egl_window_create`
// allocates a struct, stores the `wl_surface *` it was handed, and records a
// size. It calls no client function and talks to no compositor — an EGL
// implementation later reads and writes the struct through
// `wayland-egl-backend.h`.
//
// So a CI runner with no compositor can exercise the whole library honestly.
// What it cannot do is `eglCreateWindowSurface`, which needs a real
// `wl_display` from a real compositor — asserting that here would only assert
// that the runner has a desktop session.
//
// THE BACKEND HEADER IS INCLUDED ON PURPOSE. `wayland-egl-core.h` exposes four
// functions and an opaque type, so through it alone the only observable is
// "create returned non-null". `wayland-egl-backend.h` is the contract this
// library has with an EGL implementation — Mesa includes it — and reading the
// struct through it is what lets the test check that create and resize wrote
// what they claim.
//
// …
tests/examples/wayland-egl/tests/wayland-egl.cpp · 项目 tests/examples/wayland-egl
构建
A 型包:上游压缩包自带 mcpp.toml(在 */mcpp/egl/mcpp.toml)。本次构建没有抓取它的内容 —— 跑一次索引的刷新动作就能拉进来。