Files
Jihad-Browser/context/impl/impl-gpu-rendering.md
T
NotAlexNoyleandClaude Opus 5.5 d5f50632e3 T-527 (R8) / T-511 DONE: the WebGL cube at 25-28 fps on the card — the card redraws only what changed, a tall band surface (engine 0063); the PDK adapter builds again
The 480 px spinning cube, the sensors running: 25.3-28.0 fps on the card (was 16.6-22.0), 360 px 28.9-29.9,
240 px 29.4-30.0 (the page's own ~30); verify with a ticker beside the canvas and the cube stopped 0 rows wrong.

- The frame trailer's dirty words (render/browserserver/Src/JihadFrameWindow.h): before each msgPainted the
  daemon writes the rect that differs from the frame published before it and both frames' numbers — the
  union of every composite's change since, at that frame's geometry; a forgotten job, popups, a software
  frame or an earlier-posted job not yet polled make it whole (BrowserPageGoanna pubDirtyAdd/pubDirtyTake,
  publishWindow; JIHAD_GPU_NO_DIRTY=1 off). The adapter, showing that base frame at the same geometry, zoom
  and scroll, invalidates only the rect (BrowserAdapter::msgPainted, BrowserOffscreen::dirtyRect). The YAP
  messages and the header are unchanged; docs/IPC-CONTRACT.md now describes the trailer.
- Engine patch 0063 (bda31412): a change too tall for the 256-row band surface takes a 512-row band surface
  (JIHAD_GPU_BAND_TALL) instead of the frame-sized target; frames are packed for the band surface first, so
  desktop Wikipedia's pan frames stay where they were (its pan unchanged). Pins moved; 63 patches reproduce.
- The PDK adapter had not built since T-540: YapProxy.h's member initializer (m_sendFailed) is C++11 and the
  PDK's gcc 4.3.3 refuses it; initialized in the constructor. The YAP contract check passes.
- The pan's 56 ms+ gaps traced: tools/host/gap-trace.py, and with JIHAD_GPU_TIMELINE=1 the express lane notes
  why it made no frame and every trailer is logged. Desktop Wikipedia's 10 s pan: 24 gaps, all the compositor
  job's (a whole read after a tree change, the copy from the base, a job behind the page's tile uploads).
- default-check.sh reads across the daemon log's 2 MB rotation; gpu-spike-collect.sh removes the frame dumps.
- Kit R8's 24 fps criterion ticked, R3's gap criterion annotated; T-511 DONE; notes, README knobs, ENGINE-SOURCE
  0063, PICKUP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 22:04:28 -04:00

12 KiB

created, last_edited
created last_edited
2026-10-18 2026-10-25

Implementation Tracking: gpu-rendering

Build site: context/plans/build-site.md

Task Status Notes
T-502 DONE The spike, rounds 1-137 (before the kit): engine patches 0040-0042, the daemon's job pipeline. docs/RENDERING-OPTIONS.md "T-502".
T-503 DONE Rounds 138-150: fixed/sticky at minimum cost, verify trustworthy, the root composition. Commit e74e212d.
T-504 PARTIAL Rounds 162-186. render/goanna/BrowserPageGoanna.cpp (the zoom hold, gpuZoomRelease, the settle that keeps the compositor's scroll where the engine cannot reach, JIHAD_GPU_ZOOM_DUMP), GoannaRenderPage.cpp (the resolution above 1.1 in SetGpuViewport), engine 0044 (gfx/gl/GLTextureImage.cpp: 1x1 conversion, pool) and 0045 (CompositorOGL.cpp DEAA rule; slow composite/draw logs), render/goanna/test/enyo-selftest.js (t double tap), tools/device/gpu-bench.c sections 11-16, tools/device/t502/zoom-run.sh. Open: the first frame while the page's script holds the main thread (with T-505).
T-505 PARTIAL Rounds 187-201. Overscan: BrowserPageGoanna.cpp (the GPU branch's frame gpuLo/gpuFrameH, the view row in the world transform via gpuSetView, rows outside the page filled white, verify on the page rows), GoannaRenderPage.cpp (SetGpuFrameHeight, SetGpuOverscan, frame-height reads), EngineCompat.h, engine 0046 (nsLayoutUtils, nsGfxScrollFrame). Frames capped at the compositor's first pbuffer (1400 rows: a 1412-row frame read its top rows from the bottom). tools/device/t502/pan-run.sh sizes its dumps by their bytes. Table and gap trace in the build site. Open: Wikipedia ≥ 24 fps (T-515). 2026-10-19: BLOCKED with T-517 (23.2-24.1 fps).
T-515 PARTIAL Rounds 240-267. render/browserserver/Yap/YapProxy.{h,cpp} (a reader thread per proxy, the queue and wake pipe, the express and dispatch hooks, the send lock, commands tagged in arrival order, injectAsync), render/goanna/JihadFrameLock.h (the frame lock, the want lock, the main thread's away mark), render/browserserver/JihadBrowserServer.{h,cpp} (the hooks, the tick's lock let go of around the pump, the inject pan and zoom through the card's path, the express thread stopped at exit), render/goanna/BrowserPageGoanna.{h,cpp} (the express lane: expressWant/expressReturn/expressStep, xStart/xPoll/xSnapshot/xLeads; the main lane's paint window, dropped frames older than an express publish, the zoom hold released by an express frame, JIHAD_GPU_TIMELINE, JIHAD_GPU_ZOOM_DUMP=log; a 32-bit 1L << 40 fixed), GoannaRenderPage.{h,cpp} (PaintLayers, ComposePost, ComposePeek), EngineCompat.h, engine 0048 and 0049 (a composite acknowledged after the widget is gone); tools/device/t502/zoom-seq.sh, render/goanna/test/jihad-script-hold.html. Met: zooms under script within 250 ms; open: T-516, T-517.
T-510 DONE 2026-10-19. packaging/gen-variant-scripts.sh and the three generated packaging/event.d/jihad* jobs (JIHAD_GPU_COMPOSITOR=1 JIHAD_GPU_EXPRESS=1), render/browserserver/Main.cpp (the path settled before the engine starts: the env's =0, the pref read as text from prefs.js; "rendering: ..." in the log), packaging/prefs/jihad-platform-prefs.js (jihad.gpu.enabled), tools/device/t502/default-check.sh. Installed on the bench in a remount window.
T-516 PARTIAL Rounds 270-280. render/browserserver/JihadBrowserServer.cpp (the clock hold thread-safe, raised by the YAP reader on a scroll, zoom or smart-zoom request, JIHAD_CLOCK_HOLD_MS, its transitions on the timeline), render/goanna/BrowserPageGoanna.cpp (jihadBoostFrameThreads: Compositor and JihadExpress at nice -6, JIHAD_GPU_FRAME_NICE; the clocks of each express frame on the timeline); engine timeline lines for every job, compose and read (JIHAD_GPU_TIMELINE). Double taps over 250 ms: 4-8 of 12 before, 0-2 after. Open: the GPU's ramp after a pause.
T-511 PARTIAL Rounds 281-313 (docs/rounds/t502-2026-10-17/webgl-r281-313.txt). Engine 0051: dom/canvas/WebGLContext.cpp (EGL on the GPU path), widget/headless/GfxInfo.cpp (not blocklisted there), dom/canvas/WebGLContextValidate.cpp (the stencil back write mask in its own error scope), gfx/gl/GLContextProviderEGL.cpp + GLContextEGL.h (the share root of the GPU path's pbuffer contexts, JIHAD_GPU_NO_SHARE; a context released before its destruction; a canvas-sized pbuffer only for unshared contexts), gfx/gl/SharedSurface.cpp (the unshared readback through that pbuffer), gfx/layers/client/ClientCanvasLayer.cpp (the shared GL texture surface for a shared canvas). Engine 0052: the column read (CompositorBridgeParent.cpp JihadColumnRead, CompositorOGL.{h,cpp}, PuppetWidget.{h,cpp}: flag 4, the stale columns in, the change's columns out, JIHAD_GPU_NO_COLUMN_READ). Daemon: render/goanna/EngineCompat.h, GoannaRenderPage.{h,cpp} (the columns through, twelve-int poll), BrowserPageGoanna.{h,cpp} (each slot's stale columns; the own-slot base judged by the last three frames' changes). render/goanna/test/jihad-webgl-cube.html (?size, ?checks, ?lose, ?report=ext, ?stop, ?ticker). Also: render/browserserver/Yap/YapProxy.{h,cpp} pthread locks (the adapter's gcc 4.3 had not built since T-515); tools/device/t502/adapter-install.sh no longer turns on the adapter's paint log (it filled /var). Met 3 of 4 R8 criteria; open: the 480 px cube 18-20.5 fps on the card (T-517); 2026-10-19 r358: 19.5-20.9 on the card against the page's own 23.8-25.1: BLOCKED with T-517
T-517 PARTIAL Rounds 314-332. render/goanna/GoannaRenderPage.{h,cpp} (SetShmWriteThrough: the frame rows' cache clean only for a cached mapping, JIHAD_GPU_CACHE_CLEAN); frame windows: render/browserserver/Src/JihadFrameWindow.h (the trailer), render/adapter/BrowserOffscreen.{h,cpp} (rasterBuffer() at the window, the adapter's mark at allocation, the raster without the trailer), render/goanna/BrowserPageGoanna.{h,cpp} (shmTrailer, publishWindow before each msgPainted, windowsFor, each slot's window, gpuStaleAdd for both lanes and dropped frames, gpuSlotsLost on forgotten composites, the main lane's own-slot window move, the express lane's own-slot base chosen by measured frame time, JIHAD_GPU_NO_WINDOWS, JIHAD_GPU_EXPRESS_NO_OWN), engine 0053 (the window-moved flag); tools/device/t502/pan-run.sh PAN_TOP=1. Long test page 30.5-36.4 fps; Wikipedia 19-21 fps still (the sticky columns' passes)
T-517 BLOCKED Rounds 342-357. Engine 0055 (a band frame's regions in one composite), 0056 (tiles outside the clip skipped before their lock); the transaction timer on the timeline (LayerTransactionParent.cpp, the upload counters in GLUploadHelpers.cpp); tools/device/gpu-bench.c section 18. Wikipedia's 10 s pan 23.2-24.1 fps: the band frame is GPU-bound (~17 ms of compose on the GPU), both cores full; every later cut measured and not kept (dead-ends.md). Circuit breaker: the finger round (T-514) and the bench's sensord load decide.
T-506 DONE Rounds 202-203. render/browserserver/JihadBrowserServer.cpp (click, key, text and jsurl injections mark the time), BrowserPageGoanna.cpp (MarkInputLatency; the GPU publish logs "input latency" for the first frame with changed rows). Measured: anim 26-31 fps, typing 22-62 ms, DOM edits 26-70 ms, self-scroll 10.7-13.9 fps.
T-507 DONE Rounds 204-212. BrowserPageGoanna.cpp (the thumbnail from the published frame's view row mGpuJobViewRow; CompositePopups at the published job's position and zoom), render/browserserver/JihadBrowserServer.cpp (thumb <path> inject), render/goanna/test/enyo-selftest.js (< back, > forward, R reload, O<orientation>), render/goanna/test/jihad-card-events.html.
T-508 DONE Rounds 213-228. build/webos-oe/push-engine-update.sh (FFmpeg's libraries), render/goanna/test/jihad-video-styled.html, jihad-anim-opacity.html, jihad-canplay.html. Measured on the device: four codecs to the end, styled video, Flash anim and keys.
T-509 DONE Rounds 229-232. BrowserPageGoanna.cpp (gpuFallBack, the refusal count, the job bound JIHAD_GPU_JOB_BOUND_MS), GoannaRenderPage.{h,cpp} (DisableGpu, the daemon-wide off switch, ResetGpuResolution), engine 0047, tools/device/t502/three-daemons.sh + three-daemons-restore.sh.
T-512 DONE e8b0e425: engine 0057 (gfx/2d/JihadGpuLog.h exported, the GPU path's files gated), render/goanna/JihadGpuLog.h (BrowserPageGoanna, GoannaRenderPage, JihadBrowserServer), the page-closed line and default-check.sh's count, gpu-spike-start.sh NOLOG, tools/device/t502/README.md (every switch), docs/RENDERING-OPTIONS.md, README.md, docs/PICKUP.md, docs/ENGINE-SOURCE.md.
T-513 DONE 2026-10-19/24. Two inspectors (Codex out of credits) on Tier 87, twelve findings fixed; Codex by direct invocation on the fixes, T-499 and T-487 on 2026-10-24, nine more fixed: context/impl/impl-review-findings-gpu-2.md. Engine 0058 (gfx/layers/opengl/CompositorOGL.{h,cpp}, GLContextProviderEGL.cpp, AsyncCompositionManager.{h,cpp}, CompositorBridgeParent.cpp, TextureHostOGL.cpp, PuppetWidget.cpp); the daemon's BrowserPageGoanna.{h,cpp} (the shown buffer never composed into, the express jobs forgotten on a fallback, a job of another frame height given up, the verify reference posted behind its job from a static pool), GoannaRenderPage.{h,cpp} (DocumentKey/ResetLayoutSize), JihadBrowserServer.{h,cpp} (inject `target focus
T-519 DONE 2026-10-24. docs/rounds/t519-2026-10-24/ (14 pan logs, the dumps). New render/goanna/test/jihad-fixed-both.html; tools/device/t502/pan-run.sh (ROUND_DIR), tools/device/t502/README.md (the verify mode's two limits: an animating layer's rows, and its frame rates). Kit: R2 lines 2-3 and R4's four [x], R2's first [~] (the animated block under verify), R3's GPU-against-software [x]; the table in docs/RENDERING-OPTIONS.md. Open: the verify reference's animation time pinned to its job's (engine).
T-527 PARTIAL 2026-10-25 night: the zoom's sharp frame. render/goanna/GoannaRenderPage.{h,cpp} (SetGpuDpCritical, GpuResolutionFor/GpuResolutionChanges/GpuResolutionNow, JIHAD_GPU_CRIT_MARGIN), render/goanna/BrowserPageGoanna.{h,cpp} (gpuCriticalEnd, the express lane publishing a main-lane frame composed while the main thread is away, the express thread kicked by a main-lane post, the hold ended at the express post, mXTreeRes: no frame drawing the tiles at under half their size, JIHAD_GPU_ZOOM_DUMP_SEQ), engine 0062 (63c20e39: the root's displayport base kept by the paint), tools/device/t502/finger-zoom.sh. First painted frame at a new zoom 513-669 ms (was 746-2212); pans unchanged or better; verify 0 structurally wrong. docs/rounds/t527-2026-10-25/notes.txt
T-527 PARTIAL 2026-10-25 later: R8 met. render/browserserver/Src/JihadFrameWindow.h (the dirty words), render/goanna/BrowserPageGoanna.{h,cpp} (pubDirtyAdd/pubDirtyTake, publishWindow writes the rect changed since the frame before or none; jihadXNote: the express lane's idle reasons on the timeline), render/adapter/BrowserOffscreen.{h,cpp} (frameSeq, dirtyRect), render/adapter/BrowserAdapter.{h,cpp} (msgPainted invalidates only the rect when it shows the base frame at the same geometry, zoom and scroll), render/browserserver/Yap/YapProxy.{h,cpp} (the PDK build: no member initializer), engine 0063 (bda31412: the tall band surface), tools/host/gap-trace.py, tools/device/t502/default-check.sh (the log rotation), gpu-spike-collect.sh (dumps removed). The 480 px cube 25.3-28.0 fps on the card