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
Text outline support in TextField & TextEditor
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
rendering
/
atlas
/
atlas-glyph-manager-impl.cpp
diff --git
a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
index
0d72be9
..
957fd8e
100644
(file)
--- a/
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
+++ b/
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
@@
-44,6
+44,7
@@
AtlasGlyphManager::AtlasGlyphManager()
}
void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
}
void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
+ const uint32_t outlineWidth,
const PixelData& bitmap,
Dali::Toolkit::AtlasManager::AtlasSlot& slot )
{
const PixelData& bitmap,
Dali::Toolkit::AtlasManager::AtlasSlot& slot )
{
@@
-62,6
+63,7
@@
void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
GlyphRecordEntry record;
record.mIndex = glyph.index;
GlyphRecordEntry record;
record.mIndex = glyph.index;
+ record.mOutlineWidth = outlineWidth;
record.mImageId = slot.mImageId;
record.mCount = 1;
record.mImageId = slot.mImageId;
record.mCount = 1;
@@
-98,6
+100,7
@@
void AtlasGlyphManager::GenerateMeshData( uint32_t imageId,
bool AtlasGlyphManager::IsCached( Text::FontId fontId,
Text::GlyphIndex index,
bool AtlasGlyphManager::IsCached( Text::FontId fontId,
Text::GlyphIndex index,
+ uint32_t outlineWidth,
Dali::Toolkit::AtlasManager::AtlasSlot& slot )
{
for ( std::vector< FontGlyphRecord >::iterator fontGlyphRecordIt = mFontGlyphRecords.begin();
Dali::Toolkit::AtlasManager::AtlasSlot& slot )
{
for ( std::vector< FontGlyphRecord >::iterator fontGlyphRecordIt = mFontGlyphRecords.begin();
@@
-110,7
+113,7
@@
bool AtlasGlyphManager::IsCached( Text::FontId fontId,
glyphRecordIt != fontGlyphRecordIt->mGlyphRecords.End();
++glyphRecordIt )
{
glyphRecordIt != fontGlyphRecordIt->mGlyphRecords.End();
++glyphRecordIt )
{
- if ( glyphRecordIt->mIndex == index )
+ if ( glyphRecordIt->mIndex == index
&& glyphRecordIt->mOutlineWidth == outlineWidth
)
{
slot.mImageId = glyphRecordIt->mImageId;
slot.mAtlasId = mAtlasManager.GetAtlas( slot.mImageId );
{
slot.mImageId = glyphRecordIt->mImageId;
slot.mAtlasId = mAtlasManager.GetAtlas( slot.mImageId );
@@
-171,7
+174,7
@@
const Toolkit::AtlasGlyphManager::Metrics& AtlasGlyphManager::GetMetrics()
return mMetrics;
}
return mMetrics;
}
-void AtlasGlyphManager::AdjustReferenceCount( Text::FontId fontId, Text::GlyphIndex index, int32_t delta )
+void AtlasGlyphManager::AdjustReferenceCount( Text::FontId fontId, Text::GlyphIndex index,
uint32_t outlineWidth,
int32_t delta )
{
if( 0 != delta )
{
{
if( 0 != delta )
{
@@
-187,7
+190,7
@@
void AtlasGlyphManager::AdjustReferenceCount( Text::FontId fontId, Text::GlyphIn
glyphRecordIt != fontGlyphRecordIt->mGlyphRecords.End();
++glyphRecordIt )
{
glyphRecordIt != fontGlyphRecordIt->mGlyphRecords.End();
++glyphRecordIt )
{
- if ( glyphRecordIt->mIndex == index )
+ if ( glyphRecordIt->mIndex == index
&& glyphRecordIt->mOutlineWidth == outlineWidth
)
{
glyphRecordIt->mCount += delta;
DALI_ASSERT_DEBUG( glyphRecordIt->mCount >= 0 && "Glyph ref-count should not be negative" );
{
glyphRecordIt->mCount += delta;
DALI_ASSERT_DEBUG( glyphRecordIt->mCount >= 0 && "Glyph ref-count should not be negative" );