A cache for blurred text that re-uses these across frames.
void MarkFrameStart()
Mark all glyph textures as unused this frame.
~TextShadowCache()=default
TextShadowCache()=default
std::optional< Entity > Lookup(const ContentContext &renderer, const Entity &entity, const std::shared_ptr< FilterContents > &contents, const TextShadowCacheKey &)
Lookup the entity in the cache with the given filter/text contents, returning the new entity to rende...
size_t GetCacheSizeForTesting() const
void MarkFrameEnd()
Remove all glyph textures that were not referenced at least once.
constexpr bool operator()(const TextShadowCacheKey &lhs, const TextShadowCacheKey &rhs) const
std::size_t operator()(const TextShadowCacheKey &key) const
A key to look up cached glyph textures.
TextShadowCacheKey(Scalar p_max_basis, int64_t p_identifier, bool p_is_single_glyph, const Font &p_font, Sigma p_sigma)