Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodePathCacheComponent::FillVariant Struct Reference

One fill encode, built for one device-derived cubic tolerance bucket. More...

#include "donner/svg/renderer/geode/GeodePathCacheComponent.h"

Public Member Functions

bool serves (double drawTolerance) const
 True when this variant holds the encode a draw at drawTolerance would build.

Public Attributes

std::optional< EncodedPath > encode
 Cached encode. Reset by the entt signal listener when geometry changes.
double tolerance = 0.0
 Approximation tolerance of encode; zero for paths without cubic segments, whose encode is the same at every scale.
GeodeGeometryCacheReservation reservation
 Live retained-byte charge for encode.
std::uint64_t lastUse = 0
 Value of fillUseClock when this variant last served a draw; picks the variant to replace.
std::uint64_t lastUseFrame = 0
 Frame generation of the last draw this variant served, on the device lastUseDeviceId. While a frame of that device at or before this generation is open, a recorded or pending draw may still read the variant, so it is not replaced.
std::uint64_t lastUseDeviceId = 0
 GeodeDevice::deviceId() of the device whose generation lastUseFrame is.

Detailed Description

One fill encode, built for one device-derived cubic tolerance bucket.

Member Function Documentation

◆ serves()

bool donner::geode::GeodePathCacheComponent::FillVariant::serves ( double drawTolerance) const
inline

True when this variant holds the encode a draw at drawTolerance would build.

Only an exact bucket match serves the draw. Serving a finer encode at a coarser scale would make the pixels of a draw depend on which scale encoded the entity first: an element drawn at two scales would render differently in its first frame than in later ones, a difference that a blur makes visible.


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