mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-16 14:33:24 +09:00
Reword the permanent client-window refusal text and drop the stale P12 tag.
This commit is contained in:
@@ -228,8 +228,9 @@ namespace MobileGL::MG_Remote {
|
||||
}
|
||||
if (op.windowKind() == ::MobileGL::Wire::WindowKind::AndroidNativeWindow) {
|
||||
// The one refusal that is not corruption: the window kind is LEGAL and the token
|
||||
// is an ANativeWindow*, which names memory in the CLIENT's process. Real window
|
||||
// arrival is P12; until then this is refused by name at ServerApplyWireSurfaceOp.
|
||||
// is an ANativeWindow*, which names memory in the CLIENT's process. This is a
|
||||
// permanent rule (Rule H): such a handle can never cross, so it is refused by name
|
||||
// at ServerApplyWireSurfaceOp. A windowed client uses MOBILEGL_IPC_SURFACE=server.
|
||||
return SurfaceWireError::AndroidNativeWindowArrived;
|
||||
}
|
||||
if (op.windowKind() == ::MobileGL::Wire::WindowKind::MetalLayer) {
|
||||
@@ -315,16 +316,19 @@ namespace MobileGL::MG_Remote {
|
||||
static_cast<unsigned long long>(op.nativeToken()));
|
||||
} else if (error == SurfaceWireError::AndroidNativeWindowArrived) {
|
||||
(void)SessionLatch(MGFatalFamily::UnmigratedSurface,
|
||||
"MGPipe: Fatal{UnmigratedSurface, \"AndroidNativeWindow@P12\"} - a wire "
|
||||
"MGPipe: Fatal{UnmigratedSurface, \"AndroidNativeWindow:use-MOBILEGL_IPC_SURFACE=server\"} - a wire "
|
||||
"SurfaceOp (%s) named an ANativeWindow*, which is a pointer into the "
|
||||
"CLIENT's process and means nothing here. Real window arrival is P12; "
|
||||
"until then the spawn surface path is pbuffer/surfaceless only",
|
||||
"CLIENT's process and means nothing here. A client-process window "
|
||||
"handle can never cross processes: a windowed out-of-process client must "
|
||||
"use MOBILEGL_IPC_SURFACE=server (the server owns the window); "
|
||||
"otherwise it is pbuffer/surfaceless only",
|
||||
::MobileGL::Wire::EnumNameSurfaceOpKind(op.kind()));
|
||||
} else if (error == SurfaceWireError::MetalLayerArrived) {
|
||||
(void)SessionLatch(MGFatalFamily::UnmigratedSurface,
|
||||
"MGPipe: Fatal{UnmigratedSurface, \"MetalLayer@P12\"} - a wire "
|
||||
"MGPipe: Fatal{UnmigratedSurface, \"MetalLayer:use-MOBILEGL_IPC_SURFACE=server\"} - a wire "
|
||||
"SurfaceOp named a CAMetalLayer* in the CLIENT's process. "
|
||||
"Real window arrival is P12");
|
||||
"A client-process window handle can never cross processes: use "
|
||||
"MOBILEGL_IPC_SURFACE=server (the server owns the window)");
|
||||
} else {
|
||||
(void)SessionLatch(MGFatalFamily::ProtocolCorruption,
|
||||
"MGPipe: Fatal{ProtocolCorruption, \"SurfaceOp\"} - a wire surface op "
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
// ERROR SEMANTICS. Decode is pure: it answers a SurfaceWireError. The FATALS live at the server
|
||||
// entry point, ServerApplyWireSurfaceOp, because "a wire op the server cannot honour" is a
|
||||
// contract violation, not a data problem: AndroidNativeWindowArrived dies
|
||||
// Fatal{UnmigratedSurface, "AndroidNativeWindow@P12"} (the ANativeWindow* means nothing in the
|
||||
// server's process; real window arrival is P12) and everything else dies
|
||||
// Fatal{UnmigratedSurface, "AndroidNativeWindow:use-MOBILEGL_IPC_SURFACE=server"} (the ANativeWindow* means nothing in the
|
||||
// server's process, permanently - a windowed client uses MOBILEGL_IPC_SURFACE=server) and everything else dies
|
||||
// Fatal{ProtocolCorruption, "SurfaceOp"}. P6's control pump is the intended caller; P5f's unit
|
||||
// tests drive it directly. MetalLayerArrived likewise dies
|
||||
// Fatal{UnmigratedSurface, "MetalLayer@P12"}: CAMetalLayer* is also process-local.
|
||||
// Fatal{UnmigratedSurface, "MetalLayer:use-MOBILEGL_IPC_SURFACE=server"}: CAMetalLayer* is also process-local.
|
||||
//
|
||||
// P12 (on-screen server window). WindowKind::ServerOwned is the one window kind whose window is
|
||||
// NOT the client's: the server substitutes its own (ServerLoop.cpp's ServerOwned arm). The codec
|
||||
@@ -62,8 +62,8 @@ namespace MobileGL::MG_Remote {
|
||||
InprocOnlyOpOnTheWire, // a kind that may ride the inproc channel but never the wire
|
||||
WindowKindNamesNoBackend,// Surfaceless/Pbuffer where a window backend is required
|
||||
UnknownWindowKind, // a WindowKind the mapping table does not know
|
||||
MetalLayerArrived, // -> Fatal{UnmigratedSurface, "MetalLayer@P12"}
|
||||
AndroidNativeWindowArrived, // -> Fatal{UnmigratedSurface, "AndroidNativeWindow@P12"}
|
||||
MetalLayerArrived, // -> Fatal{UnmigratedSurface, "MetalLayer:use-MOBILEGL_IPC_SURFACE=server"}
|
||||
AndroidNativeWindowArrived, // -> Fatal{UnmigratedSurface, "AndroidNativeWindow:use-MOBILEGL_IPC_SURFACE=server"}
|
||||
// P12 (on-screen server window), D2. WindowKind::ServerOwned is legal on
|
||||
// CreateWindowSurface only, and only with nativeToken 0:
|
||||
ServerOwnedTokenNotZero, // -> Fatal{ProtocolCorruption, "SurfaceOp.nativeToken"}, latched
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
//
|
||||
// PROCESS-LOCAL WINDOW OBJECTS ARE REFUSED BY NAME on the wire: ANativeWindow* and
|
||||
// CAMetalLayer* mean nothing in the server process. SurfaceOpCodec names their refusals
|
||||
// AndroidNativeWindow@P12 and MetalLayer@P12, and they stay (Rule H): P12 does not carry a
|
||||
// client's window across, it gives the SERVER a window of its own (kServerOwnedWindowBackend
|
||||
// AndroidNativeWindow:use-MOBILEGL_IPC_SURFACE=server and MetalLayer:use-MOBILEGL_IPC_SURFACE=server,
|
||||
// and they are permanent (Rule H): a client's window never crosses, a windowed client uses
|
||||
// MOBILEGL_IPC_SURFACE=server, which gives the SERVER a window of its own (kServerOwnedWindowBackend
|
||||
// below, WindowKind::ServerOwned on the wire).
|
||||
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user