[MG_Remote, MG_Backend] (P12 review): a server-owned surface resizes the server's window and reports its real size, every server-owned surface keeps its geometry, and Espryt reports a window's extent only for the server's own window

- Client resize: eglResize on a headless client's server-owned surface only rewrote the backend's record of the window - the phone's SurfaceView kept its size - and the client's EGL state answered the size it asked for. The server now recognises the surface as its own (ServerLoop::m_serverOwnedSurfaces, per session) and resizes it as a geometry request (the lease re-taken by its holder, the display waited for), resizes the backend surface to the window's real extent and replies with it; BackendObject_Remote adopts that extent (ServerResizeServerOwnedWindowSurface).
- Size tracking: the client held ONE server-owned surface, so a second one took the first's geometry updates and releasing it left the first with none. ClientSession now tracks every server-owned surface and applies an extent to all of them (they share the server's one window).
- Size reports without the knob: Espryt's new extent publish fired for every window surface of a spawn/tcp session, including windows a client named itself without MOBILEGL_IPC_SURFACE=server, switching their consumer to the reallocating arm. ServerLoop now names its own leased window to the backend (MGPipeServerSetOwnedWindow, split-only) and Espryt publishes the extent only for that window.
This commit is contained in:
2026-09-24 14:03:47 +00:00
parent 277940f39f
commit 29a82617e0
8 changed files with 164 additions and 17 deletions
@@ -16258,8 +16258,11 @@ namespace MobileGL::MG_Backend::DirectGLES {
ApplyRequestedSwapInterval();
#if MOBILEGL_BUILD_DISAGGREGATED
// P12 (D3): this publish may carry the window's extent (see the push arm of the publish).
g_publishWindowExtent = true;
// P12 (D3): this publish may carry the window's extent (see the push arm of the publish) -
// review fix: only when the window is the SERVER's own (a headless client's ServerOwned
// surface). A window the client named keeps the format-only publish without the knob.
g_publishWindowExtent = MG_Pipe::MGPipeServerOwnedWindow() != nullptr &&
reinterpret_cast<const void*>(window) == MG_Pipe::MGPipeServerOwnedWindow();
PublishDefaultFramebufferDepthStencilFormat();
g_publishWindowExtent = false;
#else