Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
render_test.cc File Reference

Standalone rendering integration test for Donner on WASM. More...

#include <cstdio>
#include <cstdlib>
#include "donner/base/ParseWarningSink.h"
#include "donner/css/Color.h"
#include "donner/svg/SVG.h"
#include "donner/svg/renderer/RendererTinySkia.h"
#include "tiny_skia/Color.h"
#include "tiny_skia/Geom.h"
#include "tiny_skia/Paint.h"
#include "tiny_skia/Painter.h"
#include "tiny_skia/Pixmap.h"
#include "tiny_skia/Transform.h"
Include dependency graph for render_test.cc:

Functions

int main ()

Detailed Description

Standalone rendering integration test for Donner on WASM.

Verifies that the full Donner pipeline (parse → style → shape → render) produces correct pixel output. Tests three layers:

  1. Direct tiny_skia rasterizer (isolates rendering backend)
  2. CSS Color::ByName lookup (tests CompileTimeMap on 32-bit targets)
  3. Full SVG parse + render (end-to-end integration)

Build & run natively: bazel run //examples:render_test

Build & run as WASM: bazel build –config=wasm //examples:render_test_wasm node bazel-bin/examples/render_test_wasm/render_test.js