Commit Graph
8 Commits
Author SHA1 Message Date
NotAlexNoyle 75ccf689ef gpu compositor: an in-process OpenGL compositor behind the offscreen widget (JIHAD_GPU_COMPOSITOR)
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).
2026-11-03 08:53:30 -05:00
NotAlexNoyle a7612a322e npapi webos plugin input
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.
2026-11-03 08:53:29 -05:00
NotAlexNoyle 33898c6e66 puppetwidget offscreen zoom
(no description in the patch)

Imported from build/desktop/patches/0005-puppetwidget-offscreen-zoom.patch.
2026-11-03 08:53:26 -05:00
Moonchild a410f9e553 Issue #2909 - Base implementation of media interaction features.
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.
2026-02-07 13:24:34 +01:00
Moonchild e7e10ab287 Issue #1656 - Remove more vim control lines.
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
2023-05-05 15:53:29 +02:00
Moonchild 56d9003017 Issue #953 - Neuter the user-facing controls for e10s
This should prevent people using a massive footgun that would blow off
their entire legs. Requires appropriate FE changes.
2022-04-08 00:55:37 +02:00
wolfbeast e16bcd08aa Remove MOZ_WIDGET_GONK [2/2]
Tag #288
2018-05-13 00:08:52 +02:00
Matt A. Tobin 5f8de423f1 Add m-esr52 at 52.6.0 2018-02-02 04:16:08 -05:00