ThumbnailWorker
The thumbnail renderer: a rhi::WorkerHost of its own, whose thread and QRhi draw each request (rendering-revamp phase 22, parity RVPM-61).
| Inherits | QObject |
Declared in src/libs/libconstruct/construct/ui/ThumbnailWorker.hpp.
Detailed description
The worker lives on the thread that made it, the GUI thread. Its slots post the work to the host's thread, which holds the device; the signals come from that thread, so a receiver on another thread takes them queued. Each request's shader comes through the process's shader forge (construct::shader::SdfShaderForge), so a thumbnail shares its cache with the viewport and the previews, and each render asks the GPU pacer for a slice of the progressive class (§RVA-7).
The device goes kIdleReleaseMs after the last render and the thread stays: the host lets the QRhi go (WorkerHost::releaseDevice()), and the next render makes it again. A device loss is the host's: it rebuilds the device, and the worker's resources with it.
Key constraints: - QShader is a value type, safe to pass across threads - The worker emits QImage (implicitly shared, thread-safe), not QPixmap