Sparse zone-labels payload: the full screen-addressed texture size plus only the glyph tiles that actually carry a number.
More...
#include <phosphor-rendering/include/PhosphorRendering/ZoneLabelTexture.h>
|
| bool | isEmpty () const |
| | No glyphs to show (numbers disabled, no zones, or degenerate size).
|
| |
| bool | operator== (const ZoneLabelTexture &other) const |
| | Value equality — lets consumers (e.g.
|
| |
| bool | operator!= (const ZoneLabelTexture &other) const |
| |
| PHOSPHORRENDERING_EXPORT QImage | toImage () const |
| | Composite the sparse tiles into one full screen-addressed image (ARGB32-premultiplied).
|
| |
|
| static PHOSPHORRENDERING_EXPORT ZoneLabelTexture | fromImage (const QImage &image) |
| | Wrap a full-size image as a single tile at (0,0).
|
| |
|
| QSize | size |
| | Full screen-addressed texture size the tiles composite into.
|
| |
| QVector< ZoneLabelTile > | tiles |
| | Sparse glyph tiles; empty ⇒ no labels (transparent everywhere).
|
| |
Sparse zone-labels payload: the full screen-addressed texture size plus only the glyph tiles that actually carry a number.
Zone numbers occupy a tiny fraction of the overlay, so a full-screen ARGB32 image (~23 MB at 4K) is ~99% transparent. Carrying that image through the QML labelsTexture binding chain pins tens of MB of CPU heap for the overlay's lifetime. This payload carries only the glyph tiles (a few hundred KB); ZoneShaderNodeRhi composites them into its screen-sized GPU texture at upload time, so the uZoneLabels sampler stays screen-addressed and the effect shaders are unchanged.
◆ fromImage()
| static PHOSPHORRENDERING_EXPORT ZoneLabelTexture PhosphorRendering::ZoneLabelTexture::fromImage |
( |
const QImage & |
image | ) |
|
|
static |
Wrap a full-size image as a single tile at (0,0).
The inverse of toImage() for the common "I already have a full image" case — used by the QImage→ZoneLabelTexture metatype converter and by callers (e.g. the shader-render tool) that still produce a full QImage. A null/empty image yields an empty payload.
◆ isEmpty()
| bool PhosphorRendering::ZoneLabelTexture::isEmpty |
( |
| ) |
const |
|
inline |
No glyphs to show (numbers disabled, no zones, or degenerate size).
◆ operator!=()
| bool PhosphorRendering::ZoneLabelTexture::operator!= |
( |
const ZoneLabelTexture & |
other | ) |
const |
|
inline |
◆ operator==()
| bool PhosphorRendering::ZoneLabelTexture::operator== |
( |
const ZoneLabelTexture & |
other | ) |
const |
|
inline |
Value equality — lets consumers (e.g.
ZoneShaderItem::setLabelsTexture) skip a redundant change signal + repaint when the payload is unchanged. size is compared first to short-circuit before the per-tile deep compare.
◆ toImage()
| PHOSPHORRENDERING_EXPORT QImage PhosphorRendering::ZoneLabelTexture::toImage |
( |
| ) |
const |
Composite the sparse tiles into one full screen-addressed image (ARGB32-premultiplied).
Returns a null image when empty. Used by the render node for GPU upload and by QImage-consuming preview paths.
◆ size
| QSize PhosphorRendering::ZoneLabelTexture::size |
Full screen-addressed texture size the tiles composite into.
◆ tiles
| QVector<ZoneLabelTile> PhosphorRendering::ZoneLabelTexture::tiles |
Sparse glyph tiles; empty ⇒ no labels (transparent everywhere).
The documentation for this struct was generated from the following file: