// INTERNAL INCLUDES
#include <dali-toolkit/internal/atlas-manager/atlas-manager.h>
+#include <dali-toolkit/internal/text/line-run.h>
#include <dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h>
#include <dali-toolkit/internal/text/rendering/shaders/text-basic-shader.h>
#include <dali-toolkit/internal/text/rendering/shaders/text-bgra-shader.h>
CalculateBlocksSize( glyphs );
- for ( uint32_t i = 0; i < glyphs.Size(); ++i )
+ for( uint32_t i = 0, glyphSize = glyphs.Size(); i < glyphSize; ++i )
{
- GlyphInfo glyph = glyphs[ i ];
+ const GlyphInfo& glyph = glyphs[ i ];
// No operation for white space
if ( glyph.width && glyph.height )
}
}
- Vector2 position = positions[ i ];
+ const Vector2& position = positions[ i ];
MeshData newMeshData;
mGlyphManager.Cached( glyph.fontId, glyph.index, slot );
RenderableActor AtlasRenderer::Render( Text::ViewInterface& view )
{
-
UnparentAndReset( mImpl->mActor );
- Text::Length numberOfGlyphs = view.GetNumberOfGlyphs();
+ Length numberOfGlyphs = view.GetNumberOfGlyphs();
- if( numberOfGlyphs > 0 )
+ if( numberOfGlyphs > 0u )
{
Vector<GlyphInfo> glyphs;
glyphs.Resize( numberOfGlyphs );
- view.GetGlyphs( &glyphs[0], 0, numberOfGlyphs );
-
std::vector<Vector2> positions;
positions.resize( numberOfGlyphs );
- view.GetGlyphPositions( &positions[0], 0, numberOfGlyphs );
+
+ numberOfGlyphs = view.GetGlyphs( glyphs.Begin(),
+ &positions[0],
+ 0u,
+ numberOfGlyphs );
+ glyphs.Resize( numberOfGlyphs );
+ positions.resize( numberOfGlyphs );
+
mImpl->AddGlyphs( positions,
glyphs,
view.GetTextColor(),
view.GetUnderlineColor(),
view.GetUnderlineHeight() );
}
+
return mImpl->mActor;
}