Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::LayerInspectorPanel Class Reference

Stateful — owns one preview resource per active composite tile (keyed on CompositeTileSnapshot::id). OpenGL builds upload CPU thumbnail pixels into small GL textures. WebGPU builds keep backend texture snapshots alive and pass their texture views directly to ImGui, avoiding thumbnail readback. Construct and destroy on the presentation thread. More...

#include "donner/editor/LayerInspectorPanel.h"

Public Member Functions

 LayerInspectorPanel (std::shared_ptr<::donner::geode::GeodeDevice > geodeDevice=nullptr)
 LayerInspectorPanel (const LayerInspectorPanel &)=delete
LayerInspectorPanel & operator= (const LayerInspectorPanel &)=delete
 LayerInspectorPanel (LayerInspectorPanel &&)=delete
LayerInspectorPanel & operator= (LayerInspectorPanel &&)=delete
void render (std::span< const svg::compositor::CompositorController::CompositeTileSnapshot > tiles, const svg::compositor::CompositorController::StateSnapshot &state, Entity workerCompositorEntity, double viewportZoom, double viewportDpr, const Vector2i &viewportDesiredCanvas, const Vector2i &documentCanvas, const PresentationCoverageDiagnostics &coverageDiagnostics, const svg::compositor::CompositorController::FastPathCounters &fastPath, const svg::compositor::CompositorController::RenderFrameStats &renderStats)
 Render the panel into the current ImGui window. Must be called inside an ImGui::Begin(...) / End() pair AND on the GL thread.
void advancePresentationFrame ()
 Advance one UI presentation frame for backend texture retirement.

Detailed Description

Stateful — owns one preview resource per active composite tile (keyed on CompositeTileSnapshot::id). OpenGL builds upload CPU thumbnail pixels into small GL textures. WebGPU builds keep backend texture snapshots alive and pass their texture views directly to ImGui, avoiding thumbnail readback. Construct and destroy on the presentation thread.

Member Function Documentation

◆ render()

void donner::editor::LayerInspectorPanel::render ( std::span< const svg::compositor::CompositorController::CompositeTileSnapshot > tiles,
const svg::compositor::CompositorController::StateSnapshot & state,
Entity workerCompositorEntity,
double viewportZoom,
double viewportDpr,
const Vector2i & viewportDesiredCanvas,
const Vector2i & documentCanvas,
const PresentationCoverageDiagnostics & coverageDiagnostics,
const svg::compositor::CompositorController::FastPathCounters & fastPath,
const svg::compositor::CompositorController::RenderFrameStats & renderStats )

Render the panel into the current ImGui window. Must be called inside an ImGui::Begin(...) / End() pair AND on the GL thread.

Parameters
tilesUnified paint-order tile list from AsyncRenderer::compositorCompositeTiles. Each entry produces one row with an inline thumbnail.
stateCompositor-wide diagnostic state (active-hints count, split-path active flag, drag-target entity, canvas size). Rendered as a state header so the operator can spot mismatches between expected and actual compositor state.
workerCompositorEntityThe worker's view of the currently-promoted entity.
viewportZoomEditor viewport's zoom.
viewportDprEditor viewport's devicePixelRatio.
viewportDesiredCanvasWhat the viewport's desiredCanvasSize() currently returns.
documentCanvasWhat SVGDocument::canvasSize() currently returns — the committed canvas size the worker rendered at. Compare against viewportDesiredCanvas (commit pipeline) and state.canvasSize (compositor rasterize freshness).
coverageDiagnosticsActive bounded-raster and overview-infill presentation coverage.
fastPathFast-path counters rendered as a summary line above the table.

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