AnchoredLabelOverlay
Anchored labels composited over an RHI window (field-presentation §FVL-3, matrix FVW-58).
In the namespace rhi. Declared in src/libs/librhiwidget/rhi/AnchoredLabelOverlay.hpp.
Detailed description
A QPainter cannot draw into the swapchain of a QRhiWidget, so the overlay works in three steps:
\1. Paint the label core (utility::ui::AnchoredLabels) into a QImage of the target's device pixels, premultiplied, tagged with the device pixel ratio (code-ui.md, High-DPI). 2. In prepare(), outside a render pass, upload the image to one texture, only when the placement changed: a camera move, an anchor change or a resize. An idle view uploads nothing. 3. In composite(), inside the pass, draw one full-target triangle with premultiplied alpha blending.
Both viewports of construct use it: the worker viewport from SceneWorkerWidget's overlay hooks, the inline one from the final blit of PostProcessLayer. The caller gives the camera of the frame on the screen (§FVG-8), so a label lands on the pixels under it.