Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
SerializingRenderer.h File Reference

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. More...

#include <cstddef>
#include <cstdint>
#include <memory>
#include "donner/editor/sandbox/Wire.h"
#include "donner/svg/renderer/RendererInterface.h"
Include dependency graph for SerializingRenderer.h:

Classes

class  donner::editor::sandbox::SerializingRenderer

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Detailed Description

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.

Supported opcodes (S2 scope):

  • frame lifecycle, transforms, isolated layers
  • solid-color paint (PaintServer::None / PaintServer::Solid only)
  • clip state (rect + path shapes, no masks)
  • drawPath, drawRect, drawEllipse

Anything else emits a kUnsupported message and increments unsupportedCount() — the driver keeps making calls against us but the resulting stream is flagged lossy.