projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved reference caching in AtlasGlyphManager for text changes in an existing Text...
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
rendering
/
atlas
/
atlas-glyph-manager-impl.h
diff --git
a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
index
cbbe732
..
5008106
100644
(file)
--- a/
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
+++ b/
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h
@@
-49,11
+49,17
@@
class AtlasGlyphManager : public Dali::BaseObject
{
public:
{
public:
- struct GlyphRecord
+ struct GlyphRecord
Entry
{
{
- Text::FontId mFontId;
Text::GlyphIndex mIndex;
uint32_t mImageId;
Text::GlyphIndex mIndex;
uint32_t mImageId;
+ int32_t mCount;
+ };
+
+ struct FontGlyphRecord
+ {
+ Text::FontId mFontId;
+ Vector< GlyphRecordEntry > mGlyphRecords;
};
AtlasGlyphManager();
};
AtlasGlyphManager();
@@
-68,7
+74,8
@@
public:
/**
* @copydoc Toolkit::AtlasGlyphManager::Add
*/
/**
* @copydoc Toolkit::AtlasGlyphManager::Add
*/
- void Add( const Text::GlyphInfo& glyph,
+ void Add( Text::FontId fontId,
+ const Text::GlyphInfo& glyph,
const BufferImage& bitmap,
Dali::Toolkit::AtlasManager::AtlasSlot& slot );
const BufferImage& bitmap,
Dali::Toolkit::AtlasManager::AtlasSlot& slot );
@@
-88,7
+95,7
@@
public:
/**
* @copydoc Toolkit::AtlasGlyphManager::Cached
*/
/**
* @copydoc Toolkit::AtlasGlyphManager::Cached
*/
-
void
Cached( Text::FontId fontId,
+
bool
Cached( Text::FontId fontId,
Text::GlyphIndex index,
Dali::Toolkit::AtlasManager::AtlasSlot& slot );
Text::GlyphIndex index,
Dali::Toolkit::AtlasManager::AtlasSlot& slot );
@@
-103,11
+110,6
@@
public:
void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight );
/**
void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight );
/**
- * @copydoc Toolkit::AtlasGlyphManager::Remove
- */
- void Remove( uint32_t imageId );
-
- /**
* @copydoc toolkit::AtlasGlyphManager::GetPixelFormat
*/
Pixel::Format GetPixelFormat( uint32_t atlasId );
* @copydoc toolkit::AtlasGlyphManager::GetPixelFormat
*/
Pixel::Format GetPixelFormat( uint32_t atlasId );
@@
-117,10
+119,15
@@
public:
*/
const Toolkit::AtlasGlyphManager::Metrics& GetMetrics();
*/
const Toolkit::AtlasGlyphManager::Metrics& GetMetrics();
+ /**
+ * @copydoc toolkit::AtlasGlyphManager::AdjustReferenceCount
+ */
+ void AdjustReferenceCount( Text::FontId fontId, uint32_t imageId, int32_t delta );
+
private:
Dali::Toolkit::AtlasManager mAtlasManager;
private:
Dali::Toolkit::AtlasManager mAtlasManager;
-
Vector< GlyphRecord > m
GlyphRecords;
+
std::vector< FontGlyphRecord > mFont
GlyphRecords;
uint32_t mCount;
Toolkit::AtlasGlyphManager::Metrics mMetrics;
};
uint32_t mCount;
Toolkit::AtlasGlyphManager::Metrics mMetrics;
};