Path copies that collected geometry holds, shared between pieces that hold the same path, such as the pieces of every external <use> of one fragment. More...
#include "donner/svg/components/shape/BoundsGeometry.h"
Public Member Functions | |
| std::shared_ptr< const Path > | share (const Registry ®istry, Entity source, const Path &path, StyleResourceBudget &budget) |
A shared copy of path, which source in registry holds, reusing an identical copy made earlier. | |
| void | clear () |
| Forget every copy. | |
Path copies that collected geometry holds, shared between pieces that hold the same path, such as the pieces of every external <use> of one fragment.
Each distinct copy is charged to a byte allowance. Copies are found by a hash of their contents, so sharing a path costs one full comparison at most however many different copies its source element has.
| std::shared_ptr< const Path > donner::svg::components::BoundsGeometryPaths::share | ( | const Registry & | registry, |
| Entity | source, | ||
| const Path & | path, | ||
| StyleResourceBudget & | budget ) |
A shared copy of path, which source in registry holds, reusing an identical copy made earlier.
| registry | Registry holding source. |
| source | Entity whose geometry path is. |
| path | Path to share. |
| budget | Allowance a new copy's bytes are charged to. |
source has the same hash.