Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::compositor::CompositorController::CompositeTileSnapshot Struct Reference

One row of the layer inspector's paint-order tile structure. Promoted layers remain visible in this view even when they have no bitmap or texture payload. When pixels are available, a CPU thumbnail or backend texture snapshot lets the panel show a preview inline. More...

#include "donner/svg/compositor/CompositorController.h"

Public Types

enum class  Kind : uint8_t {
  Background ,
  Foreground ,
  Segment ,
  Layer
}
 Paint-order role of the captured compositor tile. More...

Public Attributes

Kind kind = Kind::Layer
 Role of this tile in the composite sequence.
std::string id
 Stable identifier for the editor's texture cache: "seg:{index}" or "layer:{entity}". Lets the panel reuse unchanged tile textures.
std::string label
 Human-readable panel label, such as "segment 0" or "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 segment or layer generation for change detection.
double lastRasterizeMs = 0.0
 Wall-clock duration of this segment or layer's most recent rasterization.
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
 CPU RGBA thumbnail pixels when available.

Detailed Description

One row of the layer inspector's paint-order tile structure. Promoted layers remain visible in this view even when they have no bitmap or texture payload. When pixels are available, a CPU thumbnail or backend texture snapshot lets the panel show a preview inline.

Member Enumeration Documentation

◆ Kind

Paint-order role of the captured compositor tile.

Enumerator
Background 

Legacy split-background kind; no longer emitted.

Foreground 

Legacy split-foreground kind; no longer emitted.

Segment 

Static document segment.

Layer 

Independently promoted layer.

Member Data Documentation

◆ id

std::string donner::svg::compositor::CompositorController::CompositeTileSnapshot::id

Stable identifier for the editor's texture cache: "seg:{index}" or "layer:{entity}". Lets the panel reuse unchanged tile textures.

Stable tile identifier for editor texture reuse.


The documentation for this struct was generated from the following file: