|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
| docs | |
| design_docs | |
| donner | |
| base | |
| element | |
| ElementLike.h | |
| ElementTraversalGenerators.h | |
| encoding | |
| Base64.h | |
| Decompress.h | |
| UrlDecode.h | |
| fonts | |
| Woff2Parser.h | |
| WoffFont.h | Value types for representing a Web Open Font Format (WOFF) font and its underlying sfnt tables once they have been decompressed into memory |
| WoffParser.h | |
| parser | |
| details | |
| ParserBase.h | |
| DataUrlParser.h | |
| IntegerParser.h | |
| LengthParser.h | |
| NumberParser.h | |
| xml | |
| components | |
| AttributesComponent.h | |
| EntityDeclarationsContext.h | |
| TreeComponent.h | |
| XMLDocumentContext.h | |
| XMLNamespaceContext.h | |
| XMLValueComponent.h | |
| XMLDocument.h | |
| XMLEscape.h | |
| XMLNode.h | |
| XMLParser.h | |
| XMLQualifiedName.h | Helper type for an XML attribute name with an optional namespace |
| XMLTokenizer.h | Standalone XML tokenizer for syntax highlighting and source-location-aware editing. Unlike XMLParser::Parse, this tokenizer: |
| XMLTokenType.h | Defines the token types emitted by the XML tokenizer, used for syntax highlighting and source-location-aware editing. See XMLTokenizer.h for the tokenizer API |
| BezierUtils.h | |
| Box.h | |
| CompileTimeMap.h | Defines a constexpr-friendly associative container built on top of a perfect-hash layout for fixed key sets |
| DiagnosticRenderer.h | |
| EcsRegistry.h | |
| EcsRegistry_fwd.h | |
| FailureSignalHandler.h | Installs signal handlers that print a stack trace on crash (SIGSEGV, SIGABRT, etc) |
| FileOffset.h | |
| FillRule.h | Defines the donner::FillRule enum used for determining how fills are painted on shapes |
| FormatNumber.h | |
| Length.h | |
| MathUtils.h | |
| OptionalRef.h | |
| ParseDiagnostic.h | |
| ParseResult.h | |
| ParseWarningSink.h | |
| Path.h | |
| RcString.h | |
| RcStringOrRef.h | |
| RelativeLengthMetrics.h | |
| StringUtils.h | |
| Transform.h | |
| Utils.h | |
| Vector2.h | |
| benchmarks | |
| CssParsePerfBench.cpp | CSS parser micro-benchmark suite |
| StructuredEditingPerfBench.cpp | Baseline micro-benchmark for the structured-editing design doc |
| TinySkiaRenderPerfBench.cpp | Tiny-skia-cpp rendering benchmarks (C++ only, no Rust FFI) |
| css | |
| details | |
| AnbValue.h | |
| parser | |
| details | |
| ComponentValueStream.h | Pull-based cursor over a sequence of donner::css::ComponentValue |
| Tokenizer.h | |
| AnbMicrosyntaxParser.h | |
| ColorParser.h | |
| DeclarationListParser.h | |
| RuleParser.h | |
| SelectorParser.h | |
| StylesheetParser.h | |
| ValueParser.h | |
| selectors | |
| AttributeSelector.h | |
| ClassSelector.h | |
| ComplexSelector.h | |
| CompoundSelector.h | |
| IdSelector.h | |
| PseudoClassSelector.h | |
| PseudoElementSelector.h | |
| SelectorMatchOptions.h | |
| TypeSelector.h | |
| Color.h | |
| ComponentValue.h | |
| CSS.h | |
| Declaration.h | |
| FontFace.h | |
| Rule.h | |
| Selector.h | |
| Specificity.h | |
| Stylesheet.h | |
| Token.h | |
| WqName.h | |
| editor | |
| app | |
| EditorApp.h | RenderSession — the headless sandbox/render-session core used by REPL and tooling. Owns the current document state (URI, raw bytes, rendered bitmap, wire stream) and exposes a narrow state-transition API that higher layers (a REPL, a GLFW/ImGui shell, a wasm frontend) call into |
| EditorRepl.h | RenderSessionRepl is the stdin/stdout-driven command loop that sits on top of RenderSession. It exists so that the sandbox/render-session tooling can be driven (and tested) without an ImGui window — the shell layer is a thin parser that maps line-based text commands to RenderSession methods and writes human-readable output |
| gui | |
| EditorWindow.h | EditorWindow — RAII wrapper around GLFW + OpenGL + Dear ImGui. Keeps the main binary thin by encapsulating everything that would otherwise be boilerplate: GLFW init, window creation, context current, glad loader, ImGui context, imgui_impl_glfw + imgui_impl_opengl3 setup, plus texture upload from a RendererBitmap |
| repro | |
| ReproFile.h | Data model for a .donner-repro file: a recorded sequence of editor UI inputs (mouse events, keyboard events, wheel events, window resizes) plus enough session metadata to re-instantiate the editor and replay the events deterministically |
| ReproRecorder.h | Live UI-input recorder. Install one instance in EditorShell when the user passes --save-repro <path>; call snapshotFrame() once per editor frame (before any UI widgets have consumed input events — right after window_.beginFrame() / ImGui::NewFrame()). On process exit, call flush() to serialize the recording to the destination path |
| sandbox | |
| FrameInspector.h | Headless frame inspection: decode a sandbox wire stream into an indexed list of commands with human-readable summaries, and replay any prefix of those commands into a real backend. This is the engine that S4's eventual ImGui frame inspector panel will sit on top of; keeping it UI-free means we can test it now and reuse it from non-editor contexts (bug reports, .rnr replay CLIs, structural diffs) |
| PipelinedRenderer.h | PipelinedRenderer — a multi-threaded, in-process renderer that reuses the sandbox wire format as a producer/consumer boundary between the main thread (parser + driver + serializer) and a worker thread (deserializer + real backend) |
| ReplayingRenderer.h | Decodes a SerializingRenderer wire stream and dispatches its messages onto a wrapped, real RendererInterface. The replay is host-side: the target can be RendererTinySkia, RendererGeode, or a test mock |
| RnrFile.h | .rnr — Donner Renderer Recording — is a compact on-disk container for a single sandbox wire stream plus enough metadata to reproduce the original render. The file body is the raw wire bytes from SandboxHost::renderToBackend (or SerializingRenderer::takeBuffer) appended verbatim — no re-encoding, no compression |
| SandboxCodecs.h | Encoders and decoders for Donner value types that cross the sandbox wire boundary. Every Encode* writes its type into a WireWriter; every Decode* reads from a WireReader and sets the reader's failure flag on any problem (truncation, invalid variant tag, out-of-range enum, length cap). Decoders never throw and never crash on adversarial input |
| SandboxDiff.h | Structural diff engine for .rnr recordings. Compares two decoded command streams (and their headers) using a longest-common-subsequence alignment, producing a unified-diff-style report suitable for regression triage |
| SandboxHardening.h | Defense-in-depth hardening applied inside the sandbox child process immediately after startup, before it reads any untrusted input. See docs/design_docs/0023-editor_sandbox.md §"Milestone S6" |
| SandboxHost.h | Host-side driver for the sandbox child process. See docs/design_docs/0023-editor_sandbox.md (S1 for the process model, S2 for the wire format, S3 for the host-side replay path) |
| SandboxProtocol.h | Shared protocol constants between the editor host and the donner_parser_child sandbox binary. See docs/design_docs/0023-editor_sandbox.md Milestone S1 for the one-shot byte-in / PNG-out contract these exit codes implement |
| SerializingRenderer.h | SerializingRenderer is a RendererInterface implementation that encodes each virtual method call to a WireWriter instead of rasterizing. It runs the normal RendererDriver inside its draw() entry point, so every call the driver would have made into a real backend (transform stack, paint state, draw primitives) ends up as a wire message |
| SvgSource.h | SvgSource resolves a user-supplied URI into a raw byte buffer that the sandbox child can parse. This is the host-side half of the address bar design: the host has filesystem (and eventually network) privilege, and hands the sandbox child only the resulting bytes — never the filename, never the URL |
| Wire.h | Milestone S2 wire format for the editor sandbox. See docs/design_docs/0023-editor_sandbox.md §"Wire format" |
| AsyncRenderer.h | AsyncRenderer owns a svg::Renderer and runs its draw() + takeSnapshot() on a dedicated worker thread so heavy renders don't block the UI thread |
| AsyncSVGDocument.h | AsyncSVGDocument is the editor-owned wrapper around svg::SVGDocument that gates DOM mutations through the CommandQueue and provides the snapshot hand-off to the render thread described in the M1.5 design note in docs/design_docs/editor.md |
| AttributeWriteback.h | Builds a TextPatch that updates an SVG element's attribute in the source text. This is the bridge between a canvas tool mutation (e.g. a drag that changes transform) and the source pane |
| ChangeClassifier.h | Classifies a text edit as either an attribute-value change on a specific element (fast path → SetAttributeCommand) or a structural change (fallback → ReplaceDocumentCommand). This is the M5 gate: when structured editing is enabled, the main loop calls classifyTextChange instead of unconditionally emitting a ReplaceDocumentCommand |
| ClipboardInterface.h | Abstract clipboard interface used by the editor's text-editor core (see text_editor_refactor.md). Decouples copy/cut/paste from ImGui so headless unit tests can inject an in-memory implementation instead of requiring an ImGui context |
| CommandQueue.h | CommandQueue is the per-frame EditorCommand queue described in the "AsyncSVGDocument: single-threaded command queue" section of docs/design_docs/editor.md. It accumulates editor-initiated DOM mutations on the UI thread and coalesces them at flush time |
| DialogPresenter.h | |
| DocumentSyncController.h | |
| EditorApp.h | EditorApp is the editor's top-level shell — the mutation-seam frontend that tools and the main loop interact with. Owns the AsyncSVGDocument, the active selection, and (eventually) the active tool dispatcher |
| EditorCommand.h | EditorCommand is the discriminated union of every UI-thread→DOM mutation in the M2 scope of the editor. New tools (path, node-edit, etc.) extend this variant in their own follow-up milestones — one new case per logical operation, NOT one per ECS write |
| EditorInputBridge.h | |
| EditorShell.h | |
| ExperimentalDragPresentation.h | |
| GlTextureCache.h | |
| ImGuiBackendIncludes.h | |
| ImGuiClipboard.h | Production ClipboardInterface implementation backed by ImGui's clipboard functions (ImGui::GetClipboardText / SetClipboardText) |
| ImGuiIncludes.h | |
| ImGuiInternalIncludes.h | |
| InMemoryClipboard.h | Header-only in-memory implementation of ClipboardInterface. Stores a single std::string in the object — no OS / ImGui interaction |
| KeyboardShortcutPolicy.h | |
| MenuBarPresenter.h | |
| OverlayRenderer.h | OverlayRenderer draws editor chrome (currently selection path outlines) directly into the renderer's existing frame buffer using the canvas primitives RendererInterface already exposes. It is not a separate compositing layer and not a fabricated SVG subtree — chrome and document share one render target so there is no subpixel drift between them |
| PinchEventMonitor.h | Platform-specific render-pane pinch gesture capture. On macOS this installs a local magnify-event monitor and feeds synthetic zoom scroll events into the existing editor queue |
| RenderCoordinator.h | |
| RenderPaneGesture.h | Headless classification for render-pane scroll gestures. main.cc feeds raw GLFW scroll events into this helper so tests can cover pan vs. zoom routing without depending on ImGui or GLFW |
| RenderPanePresenter.h | |
| SelectionAabb.h | |
| SelectTool.h | SelectTool is the editor's first and (in this milestone) only tool. It dispatches three different gestures off onMouseDown: |
| SidebarPresenter.h | |
| SourceSync.h | Helpers for keeping the source pane, command queue, and DOM parse state in sync when editor-owned code writes bytes back into the text buffer |
| TextBuffer.h | |
| TextEditor.h | |
| TextEditorCore.h | Headless editing substrate for the ImGui TextEditor widget |
| TextPatch.h | The TextPatch type and applyPatches function form the editor's canvas-to-text writeback sideband. When a tool mutates an attribute via EditorApp::applyMutation, it also produces a TextPatch that describes the corresponding byte-level splice in the source text. The main loop drains pending patches after flushFrame() and before rendering the source pane |
| Tool.h | Tool is the abstract interface for editor pointer tools (Select, future Path, future Node-edit, etc.). Tools observe the editor state via the EditorApp& parameter and produce DOM mutations exclusively by calling EditorApp::applyMutation() — they never touch the DOM directly |
| TracyWrapper.h | Conditional Tracy profiling macros for the editor. When ENABLE_TRACY is defined, the real Tracy profiler client is included; otherwise the macros expand to no-ops so editor code can be instrumented unconditionally |
| UndoTimeline.h | |
| ViewportGeometry.h | |
| ViewportInteractionController.h | |
| ViewportState.h | ViewportState is the single source of truth for the editor render pane's screen↔document coordinate mapping. See docs/design_docs/0025-editor_ux.md for the full design rationale; this header is the public API |
| svg | |
| components | |
| filter | |
| FilterComponent.h | |
| FilterEffect.h | |
| FilterGraph.h | |
| FilterPrimitiveComponent.h | |
| FilterSystem.h | |
| FilterUnits.h | |
| layout | |
| LayoutSystem.h | |
| SizedElementComponent.h | |
| SymbolComponent.h | |
| TransformComponent.h | |
| ViewBoxComponent.h | |
| paint | |
| ClipPathComponent.h | |
| GradientComponent.h | |
| LinearGradientComponent.h | |
| MarkerComponent.h | |
| MaskComponent.h | |
| PaintSystem.h | |
| PatternComponent.h | |
| RadialGradientComponent.h | |
| StopComponent.h | |
| resources | |
| FontResource.h | |
| ImageComponent.h | |
| ResourceManagerContext.h | |
| SubDocumentCache.h | |
| shadow | |
| ComputedShadowTreeComponent.h | |
| OffscreenShadowTreeComponent.h | |
| ShadowBranch.h | |
| ShadowEntityComponent.h | |
| ShadowTreeComponent.h | |
| ShadowTreeSystem.h | |
| shape | |
| CircleComponent.h | |
| ComputedPathComponent.h | |
| EllipseComponent.h | |
| LineComponent.h | |
| PathComponent.h | |
| PolyComponent.h | |
| RectComponent.h | |
| ShapeSystem.h | |
| style | |
| ComputedStyleComponent.h | |
| DoNotInheritFillOrStrokeTag.h | |
| StyleComponent.h | |
| StyleSystem.h | |
| text | |
| ComputedTextComponent.h | |
| ComputedTextGeometryComponent.h | |
| TextComponent.h | |
| TextPathComponent.h | |
| TextPositioningComponent.h | |
| TextRootComponent.h | |
| ClassComponent.h | |
| ComputedClipPathsComponent.h | |
| DirtyFlagsComponent.h | |
| ElementTypeComponent.h | |
| EvaluatedReferenceComponent.h | |
| IdComponent.h | |
| PathLengthComponent.h | |
| PreserveAspectRatioComponent.h | |
| RenderingBehaviorComponent.h | |
| RenderingInstanceComponent.h | |
| StylesheetComponent.h | |
| SVGDocumentContext.h | |
| compositor | |
| ComplexityBucketer.h | |
| CompositorController.h | |
| CompositorHintComponent.h | |
| CompositorLayer.h | |
| ComputedLayerAssignmentComponent.h | |
| DragSession.h | |
| DualPathVerifier.h | |
| LayerResolver.h | |
| MandatoryHintDetector.h | |
| ScopedCompositorHint.h | |
| core | |
| ClipPathUnits.h | |
| ClipRule.h | Defines the ClipRule enum used for determining how paths are clipped with "<clipPath>" |
| ColorInterpolationFilters.h | |
| CssTransform.h | |
| CursorType.h | |
| Display.h | Defines the donner::svg::Display enum, which is used to determine how an element is rendered |
| DominantBaseline.h | Defines the donner::svg::DominantBaseline enum for the dominant-baseline CSS property |
| Event.h | |
| FontStretch.h | Defines the donner::svg::FontStretch enum for the font-stretch CSS property |
| FontStyle.h | Defines the donner::svg::FontStyle enum for the font-style CSS property |
| FontVariant.h | Defines the donner::svg::FontVariant enum for the font-variant CSS property |
| Gradient.h | |
| ImageRendering.h | |
| Isolation.h | |
| LengthAdjust.h | |
| MarkerOrient.h | |
| MarkerUnits.h | |
| MaskUnits.h | |
| MixBlendMode.h | |
| Overflow.h | Defines the donner::svg::Overflow enum, which is used to determine how an element handles content that is too large for its container |
| Pattern.h | |
| PointerEvents.h | |
| PreserveAspectRatio.h | Defines PreserveAspectRatio for SVG aspect ratio preservation |
| ProcessingMode.h | |
| Stroke.h | Defines stroke CSS property enums and types, donner::svg::StrokeLinecap, donner::svg::StrokeLinejoin, and donner::svg::StrokeDasharray |
| TextAnchor.h | Defines the donner::svg::TextAnchor enum for the text-anchor CSS property |
| TextDecoration.h | Defines the donner::svg::TextDecoration bitmask for the text-decoration CSS property |
| TransformOrigin.h | |
| UserAgentStylesheet.h | |
| Visibility.h | Defines the donner::svg::Visibility enum, which is used to determine whether an element is visible or hidden |
| WritingMode.h | |
| graph | |
| RecursionGuard.h | |
| Reference.h | |
| parser | |
| AngleParser.h | |
| AttributeParser.h | |
| CssTransformParser.h | |
| LengthPercentageParser.h | |
| Number2dParser.h | |
| PathParser.h | |
| PointsListParser.h | |
| PreserveAspectRatioParser.h | |
| SVGParser.h | |
| TransformParser.h | |
| ViewBoxParser.h | |
| properties | |
| PaintServer.h | |
| PresentationAttributeParsing.h | |
| Property.h | |
| PropertyParsing.h | |
| PropertyRegistry.h | |
| RxRyProperties.h | |
| renderer | |
| common | |
| RenderingInstanceView.h | |
| geode | |
| GeodeCounters.h | Per-frame instrumentation counters for the Geode rendering backend |
| GeodeDevice.h | RAII wrapper around a WebGPU device — headless or host-provided |
| GeodeFilterEngine.h | GPU filter-graph executor for the Geode rendering backend |
| GeodeImagePipeline.h | Render pipeline for the image-blit shader (textured quad) |
| GeodePathCacheComponent.h | Per-entity cache of Geode's CPU encode pipeline output |
| GeodePathEncoder.h | CPU-side Slug band decomposition: converts a Path into GPU-ready band data |
| GeodePipeline.h | Render pipeline for the Slug fill algorithm |
| GeodeShaders.h | WGSL shader sources used by the Slug rendering pipeline |
| GeodeTextureEncoder.h | Reusable GPU texture upload + textured-quad draw helpers for Geode |
| GeodeWgpuUtil.h | Small utility shims on top of the wgpu:: C++ wrapper (from eliemichel/WebGPU-distribution's webgpu.hpp) used throughout the Geode renderer |
| GeoEncoder.h | Drawing API for the Geode GPU renderer |
| FilterGraphExecutor.h | |
| PixelFormatUtils.h | Shared RGBA8 pixel-format conversion helpers used across Donner's renderer backends and the compositor. Split out from FilterGraphExecutor.h and CompositorController.cc so that callers which don't otherwise depend on the filter graph or the compositor can still premul / unpremul without pulling those in |
| Renderer.h | |
| RendererDriver.h | |
| RendererGeode.h | Geode (WebGPU/Slug) implementation of donner::svg::RendererInterface |
| RendererImageIO.h | |
| RendererInterface.h | |
| RendererInternal.h | |
| RendererTinySkia.h | |
| RendererUtils.h | |
| RenderingContext.h | |
| ResolvedGradient.h | |
| StrokeParams.h | |
| TerminalImageViewer.h | |
| resources | |
| FontLoader.h | |
| FontManager.h | |
| FontMetadata.h | |
| ImageLoader.h | |
| ImageResource.h | |
| NullResourceLoader.h | |
| ResourceLoaderInterface.h | |
| SandboxedFileResourceLoader.h | |
| UrlLoader.h | |
| text | |
| FontDataUtils.h | |
| TextBackend.h | |
| TextBackendFull.h | |
| TextBackendSimple.h | |
| TextEngine.h | |
| TextEngineHelpers.h | Internal helpers for TextEngine layout. Exposed in a header for unit testing |
| TextLayoutParams.h | |
| TextTypes.h | |
| tool | |
| DonnerSvgTool.h | |
| DonnerSvgToolUtils.h | |
| AllSVGElements.h | A single include that covers all SVG element types, plus donner::svg::AllSVGElements which can be used to perform constexpr lookups across all element types |
| DonnerController.h | |
| ElementType.h | |
| SVG.h | |
| SVGCircleElement.h | |
| SVGClipPathElement.h | |
| SVGDefsElement.h | |
| SVGDocument.h | |
| SVGDocumentHandle.h | |
| SVGElement.h | |
| SVGElementNames.h | Compile-time lists of SVG element tag names and known attribute names, derived from donner's type registries. Used by the parser fuzzer, editor syntax highlighting, and autocomplete |
| SVGEllipseElement.h | |
| SVGFEBlendElement.h | |
| SVGFEColorMatrixElement.h | |
| SVGFEComponentTransferElement.h | |
| SVGFECompositeElement.h | |
| SVGFEConvolveMatrixElement.h | |
| SVGFEDiffuseLightingElement.h | |
| SVGFEDisplacementMapElement.h | |
| SVGFEDistantLightElement.h | |
| SVGFEDropShadowElement.h | |
| SVGFEFloodElement.h | |
| SVGFEFuncAElement.h | |
| SVGFEFuncBElement.h | |
| SVGFEFuncGElement.h | |
| SVGFEFuncRElement.h | |
| SVGFEGaussianBlurElement.h | |
| SVGFEImageElement.h | |
| SVGFEMergeElement.h | |
| SVGFEMergeNodeElement.h | |
| SVGFEMorphologyElement.h | |
| SVGFEOffsetElement.h | |
| SVGFEPointLightElement.h | |
| SVGFESpecularLightingElement.h | |
| SVGFESpotLightElement.h | |
| SVGFETileElement.h | |
| SVGFETurbulenceElement.h | |
| SVGFilterElement.h | |
| SVGFilterPrimitiveStandardAttributes.h | |
| SVGGElement.h | |
| SVGGeometryElement.h | |
| SVGGradientElement.h | |
| SVGGraphicsElement.h | |
| SVGImageElement.h | |
| SVGLinearGradientElement.h | |
| SVGLineElement.h | |
| SVGMarkerElement.h | |
| SVGMaskElement.h | |
| SVGPathElement.h | |
| SVGPatternElement.h | |
| SVGPolygonElement.h | |
| SVGPolylineElement.h | |
| SVGRadialGradientElement.h | |
| SVGRectElement.h | |
| SVGStopElement.h | |
| SVGStyleElement.h | |
| SVGSVGElement.h | |
| SVGSymbolElement.h | |
| SVGTextContentElement.h | |
| SVGTextElement.h | |
| SVGTextPathElement.h | |
| SVGTextPositioningElement.h | |
| SVGTSpanElement.h | |
| SVGUnknownElement.h | |
| SVGUseElement.h | |
| examples | |
| geode_embed_surface.h | Platform-native WebGPU surface creation helper for the geode_embed example. The implementation lives in platform-specific translation units (geode_embed_surface_linux.cc, geode_embed_surface_macos.mm) that include native-window headers (X11, Cocoa) in isolation so their macro pollution — X11/Xlib.h defining None, True, False, Status — never reaches donner headers. The consumer (geode_embed.cc) only sees this small facade |
| geode_embed_surface_macos.mm | MacOS (Cocoa/Metal) implementation of CreateSurfaceFromGlfwWindow |