Skip to main content

Module devtools

Module devtools 

Source
Expand description

DevTools — Inspection, profiling, and debugging infrastructure.

Provides:

  • Tree Inspector: snapshot the shadow tree into a serializable structure
  • Layout Overlay: gather computed layout rectangles for overlay rendering
  • Performance Profiler: track frame timing, layout stats, commit counts
  • IR Replay: record and replay IR command batches
  • WebSocket bridge types (protocol messages)

Structs§

FrameRecord
A single frame timing record.
FrameTimer
Ongoing frame measurement.
IrRecorder
Records IR batches for later replay or debugging.
LayoutOverlay
All computed layout rectangles for overlay rendering.
LayoutRect
Computed layout rectangle for a node.
NodeSnapshot
Serializable snapshot of a single node (for DevTools UI).
OverlayRect
A single overlay rectangle with metadata.
ProfileSummary
Aggregated profiler statistics.
Profiler
Rolling profiler that keeps the last N frames of timing data.
TimestampedBatch
An IR batch with its relative timestamp.

Enums§

DevToolsRequest
Messages from DevTools UI → Engine.
DevToolsResponse
Messages from Engine → DevTools UI.

Functions§

gather_overlay
Gather all layout rectangles for the overlay. If highlight_id is set, that node is marked as highlighted.
handle_devtools_request
Handle an incoming DevTools request and produce a response.
snapshot_tree
Build a full tree snapshot starting from the root.