Document-local second-chance cache. Each bucket has its own clock and at most eight entries. More...
#include "donner/svg/components/style/MatchedPropertiesCache.h"
Public Types | |
| enum class | Scope { Document , Worker } |
| Worker fronts limit eviction metadata independently of the canonical document cache. | |
Public Member Functions | |
| MatchedPropertiesCache (Scope scope=Scope::Document) | |
| const MatchedPropertiesEntry * | find (const MatchedPropertiesKey &key) |
| Returns the record for an exactly equal key. Valid until the next mutation of this cache. | |
| const MatchedPropertiesEntry * | find (const MatchedPropertiesKey &key, const ComputedStyle *parentRecord, const ComputedStyle *rootRecord) |
| Probe with borrowed records under document access. Insertion takes strong references. | |
| bool | insert (const MatchedPropertiesKey &key, MatchedPropertiesEntry entry) |
| Own an immutable snapshot of the inputs if the cache can retain the key. | |
| std::uint64_t | evictionEpoch () const |
| Changes whenever a clock bit can be cleared or a stored record removed. | |
| void | clear () |
| Release cached keys and record references when the stylesheet generation changes. | |
Static Public Member Functions | |
| static constexpr std::size_t | workerMetadataBytes () |
| Conservative reservation for all metadata that one worker front can retain. | |
| static void | discardComputedStyles (Registry ®istry) |
| Discard all computed components and the keys from their stylesheet generation together. | |
Friends | |
| struct | MatchedPropertiesCacheTestPeer |
Document-local second-chance cache. Each bucket has its own clock and at most eight entries.