|
|
Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
|
One row of the unified "everything composited together" view that the layer-inspector panel renders in paint order — design doc 0033 §M1++. Mirrors what composeLayers actually draws so the operator sees the same sequence of blits the renderer performs. More...
#include "donner/svg/compositor/CompositorController.h"
Public Types | |
| enum class | Kind : uint8_t { Background , Foreground , Segment , Layer } |
Public Attributes | |
| Kind | kind = Kind::Layer |
| std::string | id |
| Stable identifier for the editor's GL texture cache: "bg", "fg", "seg:{index}", "layer:{entity}". Lets the panel re-use uploaded textures across frames for unchanged tiles. | |
| std::string | label |
| Human-readable label rendered in the panel: "background", "foreground", "segment 0", "layer #12". | |
| Vector2i | bitmapDims = Vector2i::Zero() |
| Source bitmap dimensions in canvas pixels. Vector2i::Zero() when the source bitmap is empty. | |
| uint64_t | generation = 0 |
| Monotonic version counter for change detection. Layers / segments expose real generations; bg/fg use a derived generation that bumps when the split-bitmap cache is rebuilt. | |
| double | lastRasterizeMs = 0.0 |
| Wall-clock duration of the most recent rasterize. Always 0 for Background / Foreground (those are composed, not rasterized, by recomposeSplitBitmaps). | |
| bool | immediate = false |
| True when this segment or promoted layer is presented as a transient immediate tile instead of a retained bitmap/texture cache entry. | |
| bool | staticHeuristicImmediate = false |
| True when the static geometry-cost heuristic selected immediate presentation. | |
| bool | dynamicHeuristicImmediate = false |
| True when measured raster time expanded the span into immediate presentation. | |
| bool | demotedDynamicImmediate = false |
| True when this span just left dynamic immediate mode because the last immediate render was over budget. | |
| double | immediateBudgetChargeMs = 0.0 |
| Budget charged by this immediate tile against the 120 Hz immediate-span budget. | |
| double | immediateBudgetMs = 0.0 |
| Total 120 Hz immediate-span budget for this frame. | |
| int | estimatedDrawOps = 0 |
| Estimated direct geometry draw count used by the immediate/cached heuristic. | |
| int | estimatedPathVerbs = 0 |
| Estimated path verb count used by the immediate/cached heuristic. | |
| bool | hasExpensiveEffect = false |
| True when this span contains effects/resources that force cached presentation. | |
| bool | visible = false |
| True when this span has a visible, bounded contribution to the canvas. | |
| Box2d | boundsCanvas |
| Snapped canvas-space bounds used by the immediate/cached heuristic. | |
| uint64_t | estimatedRetainedBytes = 0 |
| Estimated retained texture bytes if this span is cached. | |
| double | estimatedRedrawCost = 0.0 |
| Relative redraw cost estimated by the immediate/cached heuristic. | |
| double | estimatedCacheOverheadCost = 0.0 |
| Relative cached-texture overhead estimated by the immediate/cached heuristic. | |
| std::string | spanRangeLabel |
| Human-readable first/last element range covered by this static segment. | |
| bool | hasValidBitmap = false |
| Whether the source bitmap has pixels. | |
| bool | isDragTarget = false |
| Whether this tile is the active drag-target layer (highlighted in the panel). Always false for non-Layer kinds. | |
| std::shared_ptr< const RendererTextureSnapshot > | textureSnapshot |
| Optional backend-owned GPU texture. Geode-backed editor builds render this directly in the layer panel to avoid a CPU readback just for diagnostics. | |
| Vector2i | thumbnailDims = Vector2i::Zero() |
| Aspect-preserving CPU downsample (max-side kLayerThumbnailMaxSide) of the source bitmap. Empty when the source has no CPU bitmap or when textureSnapshot is used instead. | |
| std::vector< uint8_t > | thumbnailPixels |
One row of the unified "everything composited together" view that the layer-inspector panel renders in paint order — design doc 0033 §M1++. Mirrors what composeLayers actually draws so the operator sees the same sequence of blits the renderer performs.
Carries either a downsampled CPU thumbnail or a backend texture snapshot for every tile (background, foreground, segment, layer) so the panel can render previews inline instead of just dimensions.