Skip to main content

Module headless

Module headless 

Source
Expand description

Headless backend for CPU-only rendering without a display server.

Used with AZUL_HEADLESS=1 for E2E testing, CI, and screenshot capture. Headless backend for CPU-only rendering without a display server.

This module provides the resource management and rendering pipeline for running Azul applications without any platform windowing APIs. It works in combination with HeadlessWindow (in dll/src/desktop/shell2/headless/) which provides the PlatformWindow trait implementation.

§Architecture

The headless path replaces the WebRender GPU pipeline with cpurender: LayoutWindow → solver3 DisplayList → cpurender → PNG/Pixmap. Compared to the GPU path there is no GL context, webrender::Renderer, or RenderApi; fonts and images are managed by FontManager/ImageCache and read directly by cpurender (no GPU texture atlas or upload), hit testing uses the layout-side CpuHitTester instead of WebRender’s AsyncHitTester, and present/swap is a no-op.

Activated with AZUL_HEADLESS=1 (optionally AZ_DEBUG=1 for the debug server).

Structs§

CpuHitTester
CPU-based hit tester that works without WebRender.

Functions§

compute_scroll_child_rect
Compute the child_rect (scrollable content bounds) of an overflowing scroll node from the layout tree.
convert_cpu_hit_test_to_full
Convert CPU hit test results to FullHitTest format.