mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Docs] (.claude/skills, .github/workflows, CMakeLists.txt, docs/archive, docs/Disaggregated, docs/MobileVA, docs/Performance, MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Backend/Record, MG_Gbm, MG_Impl, MG_Impl/EGLImpl, MG_Impl/GLImpl, MG_Impl/GLXImpl, MG_Impl/Pipe, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Pipe/generated, MG_Remote, MG_Remote/Client, MG_Remote/Server, MG_Remote/Transport, MG_Remote/Wire, MG_State/GLState, MG_Test/Pipe, MG_Test/Util, MG_Test/Wire, MobileGL, scripts, scripts/data, tools/device_bench, userguide): archive the planning notes and agent contracts under docs/archive
- DEBTS.md and OPEN-QUESTIONS.md stay maintained, now in docs/Disaggregated.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
"""host-inproc-server.py <libMobileGL.so> <endpoint>: the in-process display server entry
|
||||
(mobilegl_server_serve_inprocess) hosted by a plain host process, no display installed - the host
|
||||
twin of MobileGLDisplayActivity's server thread, for reproducing sequential-session behaviour."""
|
||||
import ctypes, os, sys, signal, threading
|
||||
lib_path, endpoint = sys.argv[1], sys.argv[2]
|
||||
for k in ("MOBILEGL_TRANSPORT", "MOBILEGL_IPC_SERVER_PATH", "MOBILEGL_IPC_RING_MB", "MOBILEGL_IPC_STAGE_MB",
|
||||
"MOBILEGL_IPC_CONTROL", "DISPLAY", "WAYLAND_DISPLAY"):
|
||||
os.environ.pop(k, None)
|
||||
os.environ.update(MOBILEGL_IPC_ROLE="server", MOBILEGL_IPC_DIAL="no", MOBILEGL_IPC_LOG_FORWARD="1")
|
||||
os.environ.setdefault("EGL_PLATFORM", "surfaceless")
|
||||
lib = ctypes.CDLL(lib_path)
|
||||
lib.mobilegl_server_serve_inprocess.argtypes = [ctypes.c_char_p]
|
||||
lib.mobilegl_server_serve_inprocess.restype = ctypes.c_int
|
||||
def stop(*_):
|
||||
lib.mobilegl_server_stop_inprocess()
|
||||
signal.signal(signal.SIGTERM, stop)
|
||||
signal.signal(signal.SIGINT, stop)
|
||||
rc = [None]
|
||||
t = threading.Thread(target=lambda: rc.__setitem__(0, lib.mobilegl_server_serve_inprocess(endpoint.encode())))
|
||||
t.start()
|
||||
while t.is_alive():
|
||||
t.join(0.2)
|
||||
print("serve returned", rc[0], flush=True)
|
||||
sys.exit(rc[0] or 0)
|
||||
Reference in New Issue
Block a user