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