*/
struct Metrics
{
- uint32_t mGlyphCount; // number of glyphs being managed
- AtlasManager::Metrics mAtlasMetrics; // metrics from the Atlas Manager
+ Metrics()
+ : mGlyphCount( 0u )
+ {}
+
+ ~Metrics()
+ {}
+
+ uint32_t mGlyphCount; ///< number of glyphs being managed
+ std::string mVerboseGlyphCounts; ///< a verbose list of the glyphs + ref counts
+ AtlasManager::Metrics mAtlasMetrics; ///< metrics from the Atlas Manager
};
/**
* @param[in] fontId The font that this glyph comes from
* @param[in] index The GlyphIndex of this glyph
* @param[out] slot container holding information about the glyph( mImage = 0 indicates not being cached )
+ *
+ * @return Whether glyph is cached or not ?
*/
- void Cached( Text::FontId fontId,
+ bool Cached( Text::FontId fontId,
Text::GlyphIndex index,
AtlasManager::AtlasSlot& slot );
void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight );
/**
- * @brief Unreference an image from the atlas and remove from cache if no longer needed
- *
- * @param[in] imageId ID of the image
- */
- void Remove( uint32_t imageId );
-
- /**
* @brief Get the Pixel Format used by an atlas
*
* @param[in] atlasId Id of atlas to check
const Metrics& GetMetrics();
/**
+ * @brief Adjust the reference count for glyph
+ *
+ * @param[in] fontId The font this image came from
+ * @param[in] index The index of the glyph
+ * @param[in] delta The adjustment to make to the reference count
+ */
+ void AdjustReferenceCount( Text::FontId fontId, Text::GlyphIndex index, int32_t delta );
+
+ /**
* @brief Get Shader used for rendering glyph effect buffers
*
* @return Handle of shader needed