commit dbe31c6780e5854c71258dee386dcd68a79fd2be parent 7dd896f308b191861f58ad499e2a2e0e108a0607 Author: anon <anon@example.com> Date: Tue, 13 Oct 2026 09:13:21 +0000 Handle window geometry, class icons and virtual frame pacing Diffstat:
| M | docs/browser-porting.md | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/docs/browser-porting.md b/docs/browser-porting.md @@ -922,6 +922,21 @@ The windowed renderer copies its separate back buffer into the primary surface with Blt. Presentation must therefore work when the primary surface has no attached flip buffer; an attachment-only presentation path silently drops these frames. +The following windowed startup path calls DirectDraw7 WaitForVerticalBlank. +Browser rendering needs a virtual frame-pacing equivalent; a timer delay +does not observe a physical Windows display's vertical blank. The blocking +begin/end flags are 1 and 4. Flag 2 requests event notification and requires +separate Win32 event semantics, which the current bridge does not provide. +Clientr subsequently queries GetWindowRect at RVA `0x3080`. Its rectangle +is in screen coordinates and must use the origin retained by MoveWindow, +rather than returning the origin-zero client rectangle. The virtual window +has no native caption or resize borders, so both rectangles share its drawable +width and height. +Clientr then loads icon resource 120 and changes its class's GCL_HICON +property (-14) with SetClassLongA at RVA `0x30cd` (return address `0x30d3`). +The class retains the icon handle supplied to RegisterClassA; replacing it +returns the previous handle. This metadata update does not require a browser +favicon or another visible window. The browser bridge renders in a worker-owned WebGL2 OffscreenCanvas. D3D row vector matrices upload as transposes; clip depth 0..w becomes -w..w. Readback