Changes following "Remove Sampler scene object"
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / rendering / atlas / atlas-glyph-manager.h
index 7a516e3..2deba24 100644 (file)
@@ -43,8 +43,16 @@ public:
    */
   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
   };
 
   /**
@@ -105,8 +113,10 @@ public:
    * @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 );
 
@@ -130,13 +140,6 @@ public:
   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
@@ -161,7 +164,7 @@ public:
    *
    * @return The sampler used by the atlas
    */
-  Sampler GetSampler( uint32_t atlasId ) const;
+  Image GetImage( uint32_t atlasId ) const;
 
   /**
    * @brief Get Glyph Manager metrics
@@ -170,6 +173,29 @@ public:
    */
   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
+   */
+  Shader GetEffectBufferShader() const;
+
+  /**
+   * @brief Get Shader used rendering Glyph Shadows
+   *
+   * @return Handle of shader needed
+   */
+  Shader GetGlyphShadowShader() const;
+
 private:
 
   explicit DALI_INTERNAL AtlasGlyphManager(Internal::AtlasGlyphManager *impl);