Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::RenderResult::CompositedTile Struct Reference

One paint-order tile from the worker's compositor snapshot. Ids and generations let presentation reuse unchanged GL textures or Geode UI registrations, including regular immediate static segments. A matching published tile may carry metadata without a fresh payload. Geometry is in document units so the presenter follows live zoom while a new canvas raster is deferred. More...

#include "donner/editor/AsyncRenderer.h"

Public Types

enum class  Kind : std::uint8_t {
  Segment ,
  Layer ,
  Immediate
}
 Static segment, promoted layer, or immediate tile category.

Public Attributes

Kind kind = Kind::Segment
 Category of this composited tile.
std::string id
 Compositor id used to find a reusable cached payload.
Entity layerEntity = entt::null
 Promoted layer, null for segment and full-canvas tiles.
std::uint64_t generation = 0
 Monotonic tile-payload generation.
svg::RendererBitmap bitmap
 CPU bitmap payload, uploaded for software or fallback presentation.
std::shared_ptr< const svg::RendererTextureSnapshot > textureSnapshot
 Backend-owned texture payload. Geode editor builds present this directly via ImGui WGPU.
Vector2i bitmapDimsPx = Vector2i::Zero()
 Intrinsic texture dimensions in raster pixels. Metadata-only tiles keep this populated so the presentation cache can reject stale texture reuse across canvas-size epochs.
Vector2i rasterCanvasSize = Vector2i::Zero()
 Raster canvas size that produced this payload. Metadata-only reuse is only valid inside the same raster-canvas epoch.
Vector2d canvasOffsetDoc = Vector2d::Zero()
 Canvas-space top-left of bitmap, in document units. Editor multiplies by pixelsPerDocUnit to get the on-screen blit origin.
Vector2d bitmapDimsDoc = Vector2d::Zero()
 Bitmap's intrinsic dimensions, in document units. Editor multiplies by current pixelsPerDocUnit to get the on-screen blit size - keeps the bitmap stretching with pinch-zoom while the canvas-size commit is debounced.
Vector2d dragTranslationDoc = Vector2d::Zero()
 For drag-target tiles, the per-frame DOM translation in doc units (the delta between the bitmap's rasterize-time DOM transform and the entity's current DOM transform). Editor adds this to canvasOffsetDoc so the dragged tile slides in real time without re-rasterizing.
Transform2d documentFromCachedDocument = Transform2d()
 Affine transform from cached document placement to presented document placement.
bool isDragTarget = false
 True when this tile is the active drag target. Useful for pre-test inspection; the editor's blit math treats drag and non-drag tiles uniformly via dragTranslationDoc.

Detailed Description

One paint-order tile from the worker's compositor snapshot. Ids and generations let presentation reuse unchanged GL textures or Geode UI registrations, including regular immediate static segments. A matching published tile may carry metadata without a fresh payload. Geometry is in document units so the presenter follows live zoom while a new canvas raster is deferred.


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