Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::RetainedStyleBytes Class Reference

Shared retained-byte account for immutable computed-style records in one document. More...

#include "donner/svg/components/style/ComputedStyleComponent.h"

Public Member Functions

 RetainedStyleBytes (std::size_t limit, std::shared_ptr< DocumentResourceFamilyBudget > family=nullptr)
 Create an account with a document-local limit and optional document-family envelope.
bool canReserve (std::size_t bytes) const
 Return whether a reservation fits without changing counters or refusal state.
bool reserve (std::size_t bytes)
 Reserve bytes for one newly created record.
void release (std::size_t bytes)
 Release bytes when the last reference to a charged record is destroyed.
bool tryReservePreparation (std::size_t bytes)
 Non-latching admission for one worker's maximum temporary memory footprint.
void releasePreparation (std::size_t bytes)
 Release a worker's temporary memory reservation independently of logical record charges.
std::size_t retainedBytes () const
 Current retained bytes.

Detailed Description

Shared retained-byte account for immutable computed-style records in one document.

Constructor & Destructor Documentation

◆ RetainedStyleBytes()

donner::svg::components::RetainedStyleBytes::RetainedStyleBytes ( std::size_t limit,
std::shared_ptr< DocumentResourceFamilyBudget > family = nullptr )
inlineexplicit

Create an account with a document-local limit and optional document-family envelope.

Parameters
limitMaximum retained computed-style bytes in this document.
familyOptional shared envelope for this document family.

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