|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
A single bitmap cache unit the compositor exposes for GPU upload — either a static segment (non-promoted content between promoted layers) or a promoted layer's own rasterization. More...
#include "donner/svg/compositor/CompositorController.h"
Public Attributes | |
| uint64_t | tileId = 0 |
| Stable id for this tile's slot in the compositor's cache topology. Segments are (0..N), layers are (1'<<31) | entityId so the two namespaces don't collide. Editor uses the tileId as the key in its GL texture cache — so as long as the compositor reuses the same tileId for a preserved bitmap, the editor keeps its texture. | |
| uint64_t | generation = 0 |
| Monotonic version counter, bumped every time this tile's pixel content is re-rasterized. Editor uploads to GL only when the generation differs from the one it last uploaded for this tileId. On the first click-to-drag after page load, at most 3 tile generations advance — the split segment's two halves and the new drag-target layer — because every other segment / filter layer keeps its identity across the layer-set change. | |
| uint32_t | paintOrderIndex = 0 |
| Position in paint order among the full compositor output. Editor composites tiles by blitting in ascending paintOrderIndex. | |
| const RendererBitmap * | bitmap = nullptr |
| Pointer into the compositor's cached bitmap. Empty if the tile's slot is structurally present but no pixel content yet (e.g., a segment whose range contains no visible non-promoted entities). | |
| Entity | layerEntity = entt::null |
| Non-null for a promoted layer tile: the promoted entity id. Null for a static segment tile. | |
| Transform2d | canvasFromBitmap |
| canvasFromBitmap transform the tile should be drawn with: maps the bitmap's local pixel grid into canvas pixels. Identity for segments and for non-drag layers; pure translation for the drag layer when the fast path has updated its offset. | |
A single bitmap cache unit the compositor exposes for GPU upload — either a static segment (non-promoted content between promoted layers) or a promoted layer's own rasterization.
The caller (editor) holds a texture per tile keyed on tileId, and only re-uploads to the GPU when generation advances. The compositor composites these in paint-order (paintOrderIndex) on the editor side.
| const RendererBitmap* donner::svg::compositor::CompositorTile::bitmap = nullptr |
Pointer into the compositor's cached bitmap. Empty if the tile's slot is structurally present but no pixel content yet (e.g., a segment whose range contains no visible non-promoted entities).
| Transform2d donner::svg::compositor::CompositorTile::canvasFromBitmap |
canvasFromBitmap transform the tile should be drawn with: maps the bitmap's local pixel grid into canvas pixels. Identity for segments and for non-drag layers; pure translation for the drag layer when the fast path has updated its offset.
| uint64_t donner::svg::compositor::CompositorTile::generation = 0 |
Monotonic version counter, bumped every time this tile's pixel content is re-rasterized. Editor uploads to GL only when the generation differs from the one it last uploaded for this tileId. On the first click-to-drag after page load, at most 3 tile generations advance — the split segment's two halves and the new drag-target layer — because every other segment / filter layer keeps its identity across the layer-set change.
| Entity donner::svg::compositor::CompositorTile::layerEntity = entt::null |
Non-null for a promoted layer tile: the promoted entity id. Null for a static segment tile.
| uint32_t donner::svg::compositor::CompositorTile::paintOrderIndex = 0 |
Position in paint order among the full compositor output. Editor composites tiles by blitting in ascending paintOrderIndex.
| uint64_t donner::svg::compositor::CompositorTile::tileId = 0 |
Stable id for this tile's slot in the compositor's cache topology. Segments are (0..N), layers are (1'<<31) | entityId so the two namespaces don't collide. Editor uses the tileId as the key in its GL texture cache — so as long as the compositor reuses the same tileId for a preserved bitmap, the editor keeps its texture.