[Refactor] (CMakeLists.txt, MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Remote/Client, MG_Remote/Protocol, MG_Remote/Server, MG_Test/Backend, scripts/data): move BackendObject's EGL bookkeeping into EGLSurfaceRegistry

- EGLSurfaceRegistry owns the display, the surface records, the active surface, each thread's binding and the one recursive lock; BackendObject holds one and is its hooks, so the EGL virtuals keep their signatures and their defaults
- the backends reach it through EGLRegistry(): lookups return copies, and the steps they compose (adopting an already-bound surface, a window's surfaces, a window's new extent) are named operations instead of writes to protected fields
- WindowBackend and WindowHandle move with it
- BackendObjectEglStateTest only re-points its accessors; the same 235 mutants, carried over, get the same verdicts except three that need a kind-None record, which no call can make, and one that cannot be written against the registry
- comments that cited BackendObject.cpp line numbers name the function
This commit is contained in:
2026-10-17 03:55:28 -04:00
parent a87732511b
commit 7de09a673d
16 changed files with 812 additions and 577 deletions
+1 -1
View File
@@ -569,7 +569,7 @@ namespace MobileGL::MG_Remote::Server {
// resizes its WINDOW (a geometry request) and replies with the window's real extent.
ServerOwnedWindowReply ServerResizeServerOwnedWindowSurface(EGLSurface surface, Uint32 width, Uint32 height);
// Also RE-PUBLISHES THE CAPS SNAPSHOT on success (R-12). BackendObject::MakeEGLCurrent runs
// InitCapabilities() on the first make-current per surface (BackendObject.cpp:341-347), so
// InitCapabilities() on the first make-current per surface (EGLSurfaceRegistry::MakeCurrent), so
// this is the moment the server's answers stop being the empty ones Accept() published -
// and a SECOND arrival IS the invalidation signal, which is how DirectGLES, which has no
// OnCapsInvalidated producer at all, tells the client without a dev-shaped backend edit.
@@ -73,7 +73,7 @@ namespace MobileGL::MG_Remote::Server {
// have none at all), so its CreateWindowSurface names the SERVER's window instead: the wire's
// WindowKind::ServerOwned with nativeToken 0. Inside a process the request travels in the
// frame's `windowBackend` slot as this value - deliberately NOT a MG_Backend::WindowBackend
// enumerator (BackendObject.h is in the pull build, gate G1), and deliberately outside every
// enumerator (EGLSurfaceRegistry.h is in the pull build, gate G1), and deliberately outside every
// range a WindowBackend could grow to, so a frame carrying it that ever reached
// UnpackWindowHandle would be refused by WindowBackendFromFrameValue's range check rather than
// cast. The server's ServerOwned arm (ServerLoop.cpp) consumes it before that point and