Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
RendererTinySkia.h File Reference
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <vector>
#include "donner/base/EcsRegistry_fwd.h"
#include "donner/svg/SVGDocument.h"
#include "donner/svg/renderer/RendererInterface.h"
#include "donner/svg/renderer/RetainedSpans.h"
#include "tiny_skia/Mask.h"
#include "tiny_skia/Paint.h"
#include "tiny_skia/Pixmap.h"
Include dependency graph for RendererTinySkia.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::RendererTinySkiaFrameCounters
 Per-frame counts of the conversions RendererTinySkia caches. More...
class  donner::svg::RendererTinySkia
 Rendering backend using tiny-skia-cpp. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Class Documentation

◆ donner::svg::RendererTinySkiaFrameCounters

struct donner::svg::RendererTinySkiaFrameCounters

Per-frame counts of the conversions RendererTinySkia caches.

Reset at every RendererTinySkia::beginFrame, so a read after a frame reports that frame's work alone. Both count only the conversion sites the caches cover, not every conversion the backend performs. Both are zero on a settled frame of an unchanged document, because every cached shape and image is served from its per-entity cache; that invariant is what keeps the caches from silently regressing into per-draw conversions, so it is pinned by a test.

Class Members
uint64_t imagePremultiplies = 0 Straight-alpha -> premultiplied image conversions performed for <image> draws, the only site the image cache covers. Layer and bitmap composites premultiply their own payloads outside the cache and are not counted.
See also
pathConversions
uint64_t pathConversions = 0 donner::Path -> tiny_skia::Path conversions performed at the shape-draw call sites the path cache covers: cache misses plus shape draws that carry no source entity to cache on. Conversions the cache does not reach are not counted, so this is not a total for the frame; clip-path shapes and text glyph and decoration outlines convert outside it.
uint64_t textGlyphMaterializations = 0 Vector-outline or bitmap materializations attempted for text glyphs in this frame.