T-527 (review 2026-10-26). SetResolution schedules no paint, and on a page with no root scroll
frame (about:addons) nothing else did: a zoom across 1.1 stayed painted at the old resolution. The
skip now compares the pres shell's resolution with the one painted and asks the whole widget chain
(invalidations land on the child). A band surface that could not be made is tried again 30 s later
instead of never (a failure may be another app holding the GPU's memory).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
T-527. JihadPaintLayers returns at once after the first paint when the widget has no invalid region,
no paint task pending and the refresh driver owes no view-manager flush: the layer tree is current
and a paint would only build the display list again (JIHAD_GPU_PAINT_ALWAYS=1 paints every time).
jihad_layout_set_displayport2 schedules a paint of the root scroll frame when the base moved
(SetDisplayPortMargins compares displayports computed with the new base on both sides).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
T-513, the review of the GPU path (two inspectors; context/impl/impl-review-findings-gpu-2.md, E1-E7):
- E1: the band scratch's size is the compositor's own (mJihadBandScratchSize), not a function-static
shared by all: with two cards one was handed a buffer another had outgrown and glReadPixels wrote
past it.
- E2: a closed card's frame-sized and band pbuffers are destroyed with its context, and
CompositorOGL::CleanupResources deletes the window targets', the band target's and the swizzle
pass's renderbuffers, framebuffers, texture and program: in the process-long share group each closed
card left ~13-16 MB of GPU memory. Twenty open/close cycles now add 76 KB.
- E3: a band frame of 257-320 rows stacked in the frame-sized target makes that surface current first
(on the Adreno 220 every target must match the current surface).
- E4: a WebGL canvas's texture source is externally owned (the producer's SharedSurface deletes the
name; in one share group the second delete could hit a name handed out again).
- E5: the reads carry their request's cancel flag (JihadSetCancel): a read given up past the daemon's
bound stops after glReadPixels, before the swizzle and any copy into the slot; a whole read (straight
into the slot) is counted, jihad_offscreen_late_writes(), and the daemon then paints every slot whole.
- E6: a frame whose chunks would pass the 12-band cap of one composite takes the whole path instead
of reading chunks it did not compose.
- E7: a sticky layer's stuck probe reaches twice the composite's scroll step (64 to 1024 px), so a fast
flick's step no longer slides its old pixels with the content.
Codex on the fixes (2026-10-24, C1): the opt-in read paths stop for a given-up frame as well: the
scratch read before its copy into the slot, the swizzle pass and the read thread after their read
(counted as late writes), the read thread also before it, and a cancelled read-thread frame is not
reported good.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
T-512: the GPU path's [jihad-gpu] diagnostics print only with JIHAD_GPU_LOG=1, or in a device round's
JIHAD_GPU_TIMELINE, JIHAD_GPU_VERIFY or JIHAD_GPU_DUMP_EVERY (one gate, gfx/2d/JihadGpuLog.h, exported
as mozilla/gfx/JihadGpuLog.h); failures and fallbacks print anyway. A daemon on the GPU path now logs
three startup lines from the engine instead of hundreds.
T-517: with JIHAD_GPU_TIMELINE a layer transaction that holds the compositor thread 3 ms or more is
logged with its parts (compositable ops and their tile uploads, layers updated, end), and every compose
job with its uploads: the express lane's frames queue behind the page's transactions.
Review of the T-511/T-517 work. With the daemon's window move (flag 8) the kept rects were copied
one at a time, each saved and written before the next was read: a rect's old rows can be another's
new ones (two stacked sticky bars), which then got the other bar's pixels. All are saved first now,
then all written, as the in-place shift does.
jihad_offscreen_gpu_given_up() (the daemon calls it when it gives the GPU path up) and
jihad_gpu_compositor_on(), which WebGL's EGL choice and the headless GfxInfo now ask: a daemon that
fell back to the software path after a GPU stall made new WebGL contexts on the abandoned GPU. The
environment is left as it is (other threads read it).
T-517. A compose job may say (flag 8) that its shift is already done: the daemon moved the frame's
window within its shared segment by the scroll instead of having 3.7 MB of rows moved (the frame
then starts that many rows further into the segment, and the rows are where the shift would have put
them). The engine then copies only the kept rects (opaque stuck layers that held still) from where
they were, the shift's rows back, and everything else about the shift (the entering rows, the fixed
layers' columns) is as before. On a Wikipedia pan the compositor thread's shift went from 6.5-9.7 ms
to 1.2-1.9.
T-511. A compose job may say which columns its bands are stale in (flag 4 and two more arguments to
jihad_offscreen_compose_start and _post; a daemon from before passes neither). When nothing else asks
for whole rows (no shift, no rows kept from another frame, no fixed columns) and the column the change
and the stale columns span is under three quarters of the width, the bands are read as that column,
in the whole path and in a band pass of one band. The poll reports the columns the composite changed
(twelve ints for such a job), so the daemon keeps each slot's stale columns as it keeps its rows.
A 480 px WebGL canvas on a 768 px card changes 482 rows a frame, and every one was read whole and
swizzled: the compositor job 44 ms against 47. JIHAD_GPU_NO_COLUMN_READ=1 reads whole rows.
T-516 device rounds. With JIHAD_GPU_TIMELINE=1 every compose job logs its queue and compose time
with a timestamp on the daemon's clock, and every compose and read logs its breakdown (otherwise
sampled), so a slow frame's time can be placed: the queue, the composite, the readback's wait for
the GPU, the CPU swizzle. The slow first frames after a pause were the readback and the swizzle
(the clocks), not the draws.
T-515, frames made off the main thread. JihadComposeStart was the layer paint (main thread) and the
compose job's post in one call. They are now apart: jihad_offscreen_paint_layers(widget, docshell)
flushes and paints the layers, as Start does first; jihad_offscreen_compose_post(...) posts the
compose and read of the layer tree as it stands, from any thread, at a view and scroll it is given
(or the ones last set). The daemon's express lane posts its frames from a thread of its own while
the main thread runs the page's script or a layer paint.
The job list is shared with that thread, so it is under a mutex: start, post, forget and abandon
take it; a poll without a wait holds it for the whole poll (a forget between the find and the
job's monitor would let the compositor task free the job under it). jihad_offscreen_compose_peek
reads a job's state without taking its result (1 done, 2 composed and being read, 0 pending).
A forgotten job's cancelled flag was set even when the job was done; it is set only with abandoned.
A compose job the daemon forgets (its bound passed, or the GPU path given up) is marked cancelled:
the compositor composes nothing more for it and writes nothing into its destination, a shared slot
the software path may be painting by then. Two device-test switches: JIHAD_GPU_TEST_NO_EGL=1 gives
the compositor no GL context, as an EGL failure would; JIHAD_GPU_TEST_STALL=<n> holds the
compositor thread 6 s on the nth job, as a GPU wait that does not return would.
T-502 (2026-10-18). Without APZ a scroll was a main-thread scroll: every step repainted the
newly exposed strip and re-uploaded the content layer. The daemon now sends the card's scroll
(jihad_offscreen_set_scroll) and AsyncCompositionManager applies it as an async transform on the
layer carrying the root content metrics, the way APZ would, with AlignFixedAndStickyLayers keeping
fixed and sticky layers still. For that, without APZ: root scroll metadata and the scrollport as a
scroll clip for a root scroll frame with a displayport (nsDisplayList, nsGfxScrollFrame), the
displayport set from layout (jihad_layout_set_displayport), and no intermediate surface for a
container under an axis-aligned scale+translate (Layers.cpp).
The Adreno 220 driver bins an FBO render by the current EGL surface's size: a 942-row frame in a
1400-row pbuffer lost its bottom 458 GL rows in some composites. The context's pbuffer is made the
frame's size (GLContextEGL::JihadUsePBufferOfSize) and the window targets with it. Scroll-only
frames (no composite request since the last composite) compose their bands stacked on their own
768x256 pbuffer and FBO, which stays current between band frames (the switch into it costs
11-13 ms); the rows kept are moved while the GPU works; one read takes the stack. A done-fd
(jihad_offscreen_set_done_fd) wakes the daemon the moment a job finishes. Nothing touches a job
after its hand-off.
T-502 (2026-10-17). With JIHAD_GPU_COMPOSITOR in the daemon's environment the headless platform
lists the OpenGL layers backend, off-main-thread composition is forced on over the bundle's
force-disabled pref, and the offscreen PuppetWidget creates an in-process CompositorBridgeParent
whose CompositorOGL draws into an EGL pbuffer context with two renderbuffer window targets (a
texture-backed one costs 370-640 ms a readback on the Adreno 220).
The frame is pulled, not pushed: the vsync scheduler only counts composite requests, the daemon
reads the count (jihad_offscreen_compositor_seq) and asks for a frame in two halves
(jihad_offscreen_compose_start / _poll / _forget): the layer paint on the main thread, then the
compose and the readback on the compositor thread into the daemon's shared buffer, with the
card's zoom and the residual scroll offset as a world transform on the layer tree
(jihad_offscreen_set_view, LayerManagerComposite::JihadSetWorldTransform). The compositor keeps
the window's flipped view on the borrowed target (the intermediate-surface draw cancels a flip
that must exist) and reverses the rows in the readback; the render bounds are the frame's size.
The readback is a band: the layer tree's own diff says what changed (JihadLastChanged) and the
daemon asks for the rows its slot has fallen behind by; the composite is scissored to the rows
read. Opt-in and measured as no gain: a read thread with a shared context, EGL fences and the
two targets used in turn (JIHAD_GPU_READ_THREAD=1), a GPU swizzle pass (JIHAD_GPU_PASS=1), the
round-5 snapshot road (JIHAD_GPU_SNAPSHOT=1).
Tiled content layers are on by default (layers.enable-tiles in all.js: the bundle's goanna.js is
read after the once-only gfx prefs are snapshotted).
Jihad Browser — webOS NPAPI plugin INPUT, the frozen plugin YAP commands, and the frame path
that makes ANIMATED plugin content run (addons R7).
Applies on top of 0005, 0008 and 0016-0023. Supersedes the earlier 0024, which carried only the
input half.
── INPUT ───────────────────────────────────────────────────────────────────────────────────
1. npapi.h — NPEvent becomes Palm's real 48-byte event union on a headless XP_UNIX build
instead of `typedef void*`. That typedef was not a harmless placeholder: NPRemoteEvent is a
raw memcpy of sizeof(NPEvent), so the parent shipped four bytes of its own address space to
the child. No event could ever have carried a payload. With a real POD the stock
NPP_HandleEvent path carries a Palm event unmodified, with no paramtraits change.
2. nsPluginInstanceOwner.cpp — ProcessEvent gains the arm this toolkit never had. Its whole
body was inside XP_MACOSX / XP_WIN / MOZ_X11, so on cairo-headless it reduced to
`return eIgnore` and a windowless plugin got nothing for its entire lifetime. Mouse maps to
npPalmPen{Down,Up,Move,Click,DoubleClick}, keys to npPalmKey{Down,Up,Press}, focus/blur to
the npPalmSystemEvent pair, reusing the MOZ_X11 arm's plugin-local coordinate recipe and
adding no zoom or scroll arithmetic of its own — which is what makes plugin input land where
page content does.
3. PluginInstanceChild.{cpp,h} — drops the truncated private JihadNpPalm* mirrors for that
NPEvent, asserts every offset against the libWebKitLuna address it was read from, and adds a
capped input-delivery breadcrumb.
4. nsPluginHost.{cpp,h} — jihad_plugin_palm_spotlight, a MOZ_EXPORT'd C entry point (the
jihad_offscreen_* precedent) so the daemon can deliver npPalmSpotlightStart/EndEvent for the
frozen asyncCmdPluginSpotlight* commands. nsNPAPIPluginInstance::HandleEvent is neither
exported nor virtual, so there is no other route.
── ANIMATION ───────────────────────────────────────────────────────────────────────────────
5. nsPluginInstanceOwner.cpp — the windowless invalidate now names the PLUGIN's box instead of
the whole widget. 0021 invalidated nearest->GetBounds() on the reasoning that the daemon
repainted everything anyway; once the daemon learned to repaint only damaged rows, that
reasoning inverted and a full-viewport damage box forced the expensive path on every frame.
6. PuppetWidget.{cpp,h} — accumulate the bounding box of everything invalidated since the last
drain, exposed as jihad_offscreen_take_dirty_rect beside the existing flag, so the daemon can
repaint 320x240 (~2 ms) instead of the whole viewport (~38 ms).
7. PluginInstanceChild.cpp — the Palm draw event always covers the WHOLE plugin surface. The
PGContext is built for the full surface, so pairing it with a dstBuffer offset into the
middle of that surface made the plugin's blit run off the end — SIGBUS in the plugin child
the moment the host started sending partial invalidations. Palm's own host never sent a
partial rect either.
8. PluginInstanceParent.cpp — a bounded RecvShow frame-rate line, so the rate frames actually
cross the process boundary can be compared against the rate the plugin was asked to draw.
Device-measured with a purpose-built 30fps SWF (render/goanna/test/make-anim-swf.py): the
plugin draws at 27-31 fps, every frame crosses IPC, and the card composites at 28.3 fps with an
average frame gap of 31-35 ms. Before this work the same content drew at 30 fps inside the
plugin and reached the screen 5 times in 25 seconds.
Imported from build/desktop/patches/0024-npapi-webos-plugin-input.patch.
This implements `hover`, `pointer`, `any-hover` and `any-pointer` and
the values `course`/`fine` (pointer) and `hover`.
A best effort is made to get capabilities from the system but if unknown
always falls back to assuming a mouse is present.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from accessible, [root], tools, uriloader, widget, xpcom and
xpfe.
Resolves#1656