[Tizen] Move glyph cache manager into font-client-plugin-cache-handler
[platform/core/uifw/dali-adaptor.git] / dali / internal / text / text-abstraction / plugin / font-face-cache-item.h
index 08baff7..10608d7 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DALI_TEST_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H
-#define DALI_TEST_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H
+#ifndef DALI_TEXT_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H
+#define DALI_TEXT_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H
 
 /*
  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
@@ -41,15 +41,17 @@ namespace Dali::TextAbstraction::Internal
  */
 struct FontFaceCacheItem : public FontCacheItemInterface
 {
-  FontFaceCacheItem(FT_Library&        freeTypeLibrary,
+  FontFaceCacheItem(const FT_Library&  freeTypeLibrary,
                     FT_Face            ftFace,
+                    GlyphCacheManager* glyphCacheManager,
                     const FontPath&    path,
                     PointSize26Dot6    requestedPointSize,
                     FaceIndex          face,
                     const FontMetrics& metrics);
 
-  FontFaceCacheItem(FT_Library&        freeTypeLibrary,
+  FontFaceCacheItem(const FT_Library&  freeTypeLibrary,
                     FT_Face            ftFace,
+                    GlyphCacheManager* glyphCacheManager,
                     const FontPath&    path,
                     PointSize26Dot6    requestedPointSize,
                     FaceIndex          face,
@@ -129,10 +131,10 @@ struct FontFaceCacheItem : public FontCacheItemInterface
   }
 
 public:
-  FT_Library& mFreeTypeLibrary; ///< A handle to a FreeType library instance.
-  FT_Face     mFreeTypeFace;    ///< The FreeType face.
+  const FT_Library& mFreeTypeLibrary; ///< A handle to a FreeType library instance.
+  FT_Face           mFreeTypeFace;    ///< The FreeType face.
 
-  std::unique_ptr<GlyphCacheManager> mGlyphCacheManager; ///< The glyph cache manager. It will cache this face's glyphs.
+  GlyphCacheManager*                 mGlyphCacheManager; ///< The reference of Glyph cache manager. Owned from font-client-plugin-cache-handler.
   std::unique_ptr<HarfBuzzProxyFont> mHarfBuzzProxyFont; ///< The harfbuzz font. It will store harfbuzz relate data.
 
   FontPath        mPath;                  ///< The path to the font file name.
@@ -151,4 +153,4 @@ public:
 
 } // namespace Dali::TextAbstraction::Internal
 
-#endif //DALI_TEST_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H
+#endif //DALI_TEXT_ABSTRACTION_INTERNAL_FONT_FACE_CACHE_ITEM_H