2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.h>
22 #include <dali/dali.h>
23 #include <dali/devel-api/object/property-buffer.h>
24 #include <dali/devel-api/rendering/geometry.h>
25 #include <dali/devel-api/rendering/renderer.h>
26 #include <dali/devel-api/rendering/sampler.h>
27 #include <dali/devel-api/rendering/shader.h>
28 #include <dali/devel-api/text-abstraction/font-client.h>
29 #include <dali/integration-api/debug.h>
32 #include <dali-toolkit/public-api/controls/control-depth-index-ranges.h>
33 #include <dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h>
36 using namespace Dali::Toolkit;
37 using namespace Dali::Toolkit::Text;
41 #if defined(DEBUG_ENABLED)
42 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_RENDERING");
45 const float ZERO( 0.0f );
46 const float HALF( 0.5f );
47 const float ONE( 1.0f );
48 const float TWO( 2.0f );
49 const uint32_t DEFAULT_ATLAS_WIDTH = 512u;
50 const uint32_t DEFAULT_ATLAS_HEIGHT = 512u;
52 struct AtlasRenderer::Impl : public ConnectionTracker
65 AtlasManager::Mesh2D mMesh;
66 FrameBufferImage mBuffer;
75 float mUnderlinePosition;
76 float mUnderlineThickness;
77 uint32_t mMeshRecordIndex;
83 Text::GlyphIndex mIndex;
89 uint32_t mNeededBlockWidth;
90 uint32_t mNeededBlockHeight;
95 mGlyphManager = AtlasGlyphManager::Get();
96 mFontClient = TextAbstraction::FontClient::Get();
98 mQuadVertexFormat[ "aPosition" ] = Property::VECTOR2;
99 mQuadVertexFormat[ "aTexCoord" ] = Property::VECTOR2;
100 mQuadIndexFormat[ "indices" ] = Property::UNSIGNED_INTEGER;
103 void AddGlyphs( const std::vector<Vector2>& positions,
104 const Vector<GlyphInfo>& glyphs,
105 const Vector4& textColor,
106 const Vector2& shadowOffset,
107 const Vector4& shadowColor,
108 bool underlineEnabled,
109 const Vector4& underlineColor,
110 float underlineHeight )
112 AtlasManager::AtlasSlot slot;
113 std::vector< MeshRecord > meshContainer;
114 Vector< Extent > extents;
116 float currentUnderlinePosition = ZERO;
117 float currentUnderlineThickness = underlineHeight;
118 uint32_t currentBlockSize = 0;
119 FontId lastFontId = 0;
120 Style style = STYLE_NORMAL;
122 if ( fabsf( shadowOffset.x ) > Math::MACHINE_EPSILON_1 || fabsf( shadowOffset.y ) > Math::MACHINE_EPSILON_1 )
124 style = STYLE_DROP_SHADOW;
127 if ( mImageIds.Size() )
129 // Unreference any currently used glyphs
133 CalculateBlocksSize( glyphs );
135 for( uint32_t i = 0, glyphSize = glyphs.Size(); i < glyphSize; ++i )
137 const GlyphInfo& glyph = glyphs[ i ];
139 // No operation for white space
140 if ( glyph.width && glyph.height )
142 // Are we still using the same fontId as previous
143 if ( glyph.fontId != lastFontId )
145 // We need to fetch fresh font underline metrics
146 FontMetrics fontMetrics;
147 mFontClient.GetFontMetrics( glyph.fontId, fontMetrics );
148 currentUnderlinePosition = ceil( fabsf( fontMetrics.underlinePosition ) );
149 float descender = ceil( fabsf( fontMetrics.descender ) );
151 if ( underlineHeight == ZERO )
153 currentUnderlineThickness = fontMetrics.underlineThickness;
155 // Ensure underline will be at least a pixel high
156 if ( currentUnderlineThickness < ONE )
158 currentUnderlineThickness = ONE;
162 currentUnderlineThickness = ceil( currentUnderlineThickness );
166 // Clamp the underline position at the font descender and check for ( as EFL describes it ) a broken font
167 if ( currentUnderlinePosition > descender )
169 currentUnderlinePosition = descender;
171 if ( ZERO == currentUnderlinePosition )
173 // Move offset down by one ( EFL behavior )
174 currentUnderlinePosition = ONE;
178 const Vector2& position = positions[ i ];
179 AtlasManager::Mesh2D newMesh;
180 mGlyphManager.Cached( glyph.fontId, glyph.index, slot );
184 // This glyph already exists so generate mesh data plugging in our supplied position
185 mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh );
186 mImageIds.PushBack( slot.mImageId );
191 // Select correct size for new atlas if needed....?
192 if ( lastFontId != glyph.fontId )
194 for ( uint32_t j = 0; j < mBlockSizes.size(); ++j )
196 if ( mBlockSizes[ j ].mFontId == glyph.fontId )
198 currentBlockSize = j;
199 mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH,
200 DEFAULT_ATLAS_HEIGHT,
201 mBlockSizes[ j ].mNeededBlockWidth,
202 mBlockSizes[ j ].mNeededBlockHeight );
207 // Create a new image for the glyph
208 BufferImage bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
211 // Ensure that the next image will fit into the current block size
212 bool setSize = false;
213 if ( bitmap.GetWidth() > mBlockSizes[ currentBlockSize ].mNeededBlockWidth )
216 mBlockSizes[ currentBlockSize ].mNeededBlockWidth = bitmap.GetWidth();
218 if ( bitmap.GetHeight() > mBlockSizes[ currentBlockSize ].mNeededBlockHeight )
221 mBlockSizes[ currentBlockSize ].mNeededBlockHeight = bitmap.GetHeight();
226 mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH,
227 DEFAULT_ATLAS_HEIGHT,
228 mBlockSizes[ currentBlockSize ].mNeededBlockWidth,
229 mBlockSizes[ currentBlockSize ].mNeededBlockHeight );
232 // Locate a new slot for our glyph
233 mGlyphManager.Add( glyph, bitmap, slot );
235 // Generate mesh data for this quad, plugging in our supplied position
238 mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh );
239 mImageIds.PushBack( slot.mImageId );
243 // Find an existing mesh data object to attach to ( or create a new one, if we can't find one using the same atlas)
244 StitchTextMesh( meshContainer,
248 position.y + glyph.yBearing,
249 currentUnderlinePosition,
250 currentUnderlineThickness,
252 lastFontId = glyph.fontId;
256 if ( underlineEnabled )
258 // Check to see if any of the text needs an underline
259 GenerateUnderlines( meshContainer, extents, underlineColor, textColor );
262 // For each MeshData object, create a mesh actor and add to the renderable actor
263 if ( meshContainer.size() )
265 for ( std::vector< MeshRecord >::iterator mIt = meshContainer.begin(); mIt != meshContainer.end(); ++mIt )
267 Actor actor = CreateMeshActor( *mIt );
269 // Create an effect if necessary
270 if ( style == STYLE_DROP_SHADOW )
272 actor.Add( GenerateShadow( *mIt, shadowOffset, shadowColor ) );
284 mActor.OffStageSignal().Connect( this, &AtlasRenderer::Impl::OffStageDisconnect );
286 #if defined(DEBUG_ENABLED)
287 Toolkit::AtlasGlyphManager::Metrics metrics = mGlyphManager.GetMetrics();
288 DALI_LOG_INFO( gLogFilter, Debug::General, "TextAtlasRenderer::GlyphManager::GlyphCount: %i, AtlasCount: %i, TextureMemoryUse: %iK\n",
290 metrics.mAtlasMetrics.mAtlasCount,
291 metrics.mAtlasMetrics.mTextureMemoryUsed / 1024 );
292 for ( uint32_t i = 0; i < metrics.mAtlasMetrics.mAtlasCount; ++i )
294 DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Atlas [%i] %sPixels: %s Size: %ix%i, BlockSize: %ix%i, BlocksUsed: %i/%i\n",
295 i + 1, i > 8 ? "" : " ",
296 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mPixelFormat == Pixel::L8 ? "L8 " : "BGRA",
297 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mSize.mWidth,
298 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mSize.mHeight,
299 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mSize.mBlockWidth,
300 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mSize.mBlockHeight,
301 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mBlocksUsed,
302 metrics.mAtlasMetrics.mAtlasMetrics[ i ].mTotalBlocks );
307 Actor CreateMeshActor( const MeshRecord& meshRecord )
309 PropertyBuffer quadVertices = PropertyBuffer::New( mQuadVertexFormat, meshRecord.mMesh.mVertices.Size() );
310 PropertyBuffer quadIndices = PropertyBuffer::New( mQuadIndexFormat, meshRecord.mMesh.mIndices.Size() );
311 quadVertices.SetData( const_cast< AtlasManager::Vertex2D* >( &meshRecord.mMesh.mVertices[ 0 ] ) );
312 quadIndices.SetData( const_cast< unsigned int* >( &meshRecord.mMesh.mIndices[ 0 ] ) );
314 Geometry quadGeometry = Geometry::New();
315 quadGeometry.AddVertexBuffer( quadVertices );
316 quadGeometry.SetIndexBuffer( quadIndices );
318 Material material = mGlyphManager.GetMaterial( meshRecord.mAtlasId );
319 Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
320 Actor actor = Actor::New();
321 actor.AddRenderer( renderer );
322 actor.SetSize( 1.0f, 1.0f );
323 actor.SetColor( meshRecord.mColor );
325 if ( meshRecord.mIsUnderline )
327 actor.SetColorMode( USE_OWN_COLOR );
331 actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
336 void StitchTextMesh( std::vector< MeshRecord >& meshContainer,
337 AtlasManager::Mesh2D& newMesh,
338 Vector< Extent >& extents,
339 const Vector4& color,
341 float underlinePosition,
342 float underlineThickness,
343 AtlasManager::AtlasSlot& slot )
347 float left = newMesh.mVertices[ 0 ].mPosition.x;
348 float right = newMesh.mVertices[ 1 ].mPosition.x;
350 // Check to see if there's a mesh data object that references the same atlas ?
352 for ( std::vector< MeshRecord >::iterator mIt = meshContainer.begin(); mIt != meshContainer.end(); ++mIt, ++index )
354 if ( slot.mAtlasId == mIt->mAtlasId && color == mIt->mColor )
356 // Stitch the mesh to the existing mesh and adjust any extents
357 mGlyphManager.StitchMesh( mIt->mMesh, newMesh );
358 AdjustExtents( extents,
365 underlineThickness );
370 // No mesh data object currently exists that references this atlas, so create a new one
371 MeshRecord meshRecord;
372 meshRecord.mAtlasId = slot.mAtlasId;
373 meshRecord.mMesh = newMesh;
374 meshRecord.mColor = color;
375 meshRecord.mIsUnderline = false;
376 meshContainer.push_back( meshRecord );
378 // Adjust extents for this new meshrecord
379 AdjustExtents( extents,
381 meshContainer.size() - 1u,
386 underlineThickness );
391 void AdjustExtents( Vector< Extent >& extents,
392 std::vector< MeshRecord>& meshRecords,
397 float underlinePosition,
398 float underlineThickness )
400 bool foundExtent = false;
401 for ( Vector< Extent >::Iterator eIt = extents.Begin(); eIt != extents.End(); ++eIt )
403 if ( Equals( baseLine, eIt->mBaseLine ) )
406 if ( left < eIt->mLeft )
410 if ( right > eIt->mRight )
415 if ( underlinePosition > eIt->mUnderlinePosition )
417 eIt->mUnderlinePosition = underlinePosition;
419 if ( underlineThickness > eIt->mUnderlineThickness )
421 eIt->mUnderlineThickness = underlineThickness;
429 extent.mRight = right;
430 extent.mBaseLine = baseLine;
431 extent.mUnderlinePosition = underlinePosition;
432 extent.mUnderlineThickness = underlineThickness;
433 extent.mMeshRecordIndex = index;
434 extents.PushBack( extent );
438 // Unreference any glyphs that were used with this actor
439 void OffStageDisconnect( Dali::Actor actor )
446 for ( uint32_t i = 0; i < mImageIds.Size(); ++i )
448 mGlyphManager.Remove( mImageIds[ i ] );
450 mImageIds.Resize( 0 );
453 void CalculateBlocksSize( const Vector<GlyphInfo>& glyphs )
455 MaxBlockSize maxBlockSize;
456 for ( uint32_t i = 0; i < glyphs.Size(); ++i )
458 FontId fontId = glyphs[ i ].fontId;
459 bool foundFont = false;
460 for ( uint32_t j = 0; j < mBlockSizes.size(); ++j )
462 if ( mBlockSizes[ j ].mFontId == fontId )
469 FontMetrics fontMetrics;
470 mFontClient.GetFontMetrics( fontId, fontMetrics );
471 maxBlockSize.mNeededBlockWidth = static_cast< uint32_t >( fontMetrics.height );
472 maxBlockSize.mNeededBlockHeight = static_cast< uint32_t >( fontMetrics.height );
473 maxBlockSize.mFontId = fontId;
474 mBlockSizes.push_back( maxBlockSize );
479 void GenerateUnderlines( std::vector< MeshRecord>& meshRecords,
480 Vector< Extent >& extents,
481 const Vector4& underlineColor,
482 const Vector4& textColor )
484 AtlasManager::Mesh2D newMesh;
485 unsigned short faceIndex = 0;
486 for ( Vector< Extent >::ConstIterator eIt = extents.Begin(); eIt != extents.End(); ++eIt )
488 AtlasManager::Vertex2D vert;
489 uint32_t index = eIt->mMeshRecordIndex;
490 Vector2 uv = mGlyphManager.GetAtlasSize( meshRecords[ index ].mAtlasId );
492 // Make sure we don't hit texture edge for single pixel texture ( filled pixel is in top left of every atlas )
493 float u = HALF / uv.x;
494 float v = HALF / uv.y;
495 float thickness = eIt->mUnderlineThickness;
496 float baseLine = eIt->mBaseLine + eIt->mUnderlinePosition - ( thickness * HALF );
497 float tlx = eIt->mLeft;
498 float brx = eIt->mRight;
500 vert.mPosition.x = tlx;
501 vert.mPosition.y = baseLine;
502 vert.mTexCoords.x = ZERO;
503 vert.mTexCoords.y = ZERO;
504 newMesh.mVertices.PushBack( vert );
506 vert.mPosition.x = brx;
507 vert.mPosition.y = baseLine;
508 vert.mTexCoords.x = u;
509 newMesh.mVertices.PushBack( vert );
511 vert.mPosition.x = tlx;
512 vert.mPosition.y = baseLine + thickness;
513 vert.mTexCoords.x = ZERO;
514 vert.mTexCoords.y = v;
515 newMesh.mVertices.PushBack( vert );
517 vert.mPosition.x = brx;
518 vert.mPosition.y = baseLine + thickness;
519 vert.mTexCoords.x = u;
520 newMesh.mVertices.PushBack( vert );
522 // Six indices in counter clockwise winding
523 newMesh.mIndices.PushBack( faceIndex + 1u );
524 newMesh.mIndices.PushBack( faceIndex );
525 newMesh.mIndices.PushBack( faceIndex + 2u );
526 newMesh.mIndices.PushBack( faceIndex + 2u );
527 newMesh.mIndices.PushBack( faceIndex + 3u );
528 newMesh.mIndices.PushBack( faceIndex + 1u );
531 if ( underlineColor == textColor )
533 mGlyphManager.StitchMesh( meshRecords[ index ].mMesh, newMesh );
538 record.mMesh = newMesh;
539 record.mAtlasId = meshRecords[ index ].mAtlasId;
540 record.mColor = underlineColor;
541 record.mIsUnderline = true;
542 meshRecords.push_back( record );
547 Actor GenerateShadow( MeshRecord& meshRecord,
548 const Vector2& shadowOffset,
549 const Vector4& shadowColor )
551 // Scan vertex buffer to determine width and height of effect buffer needed
552 const Vector< AtlasManager::Vertex2D >& verts = meshRecord.mMesh.mVertices;
553 float tlx = verts[ 0 ].mPosition.x;
554 float tly = verts[ 0 ].mPosition.y;
558 for ( uint32_t i = 0; i < verts.Size(); ++i )
560 if ( verts[ i ].mPosition.x < tlx )
562 tlx = verts[ i ].mPosition.x;
564 if ( verts[ i ].mPosition.y < tly )
566 tly = verts[ i ].mPosition.y;
568 if ( verts[ i ].mPosition.x > brx )
570 brx = verts[ i ].mPosition.x;
572 if ( verts[ i ].mPosition.y > bry )
574 bry = verts[ i ].mPosition.y;
578 float width = brx - tlx;
579 float height = bry - tly;
580 float divWidth = TWO / width;
581 float divHeight = TWO / height;
583 // Create a buffer to render to
584 meshRecord.mBuffer = FrameBufferImage::New( width, height );
586 // We will render a quad into this buffer
587 unsigned int indices[ 6 ] = { 1, 0, 2, 2, 3, 1 };
588 PropertyBuffer quadVertices = PropertyBuffer::New( mQuadVertexFormat, 4u );
589 PropertyBuffer quadIndices = PropertyBuffer::New( mQuadIndexFormat, sizeof(indices)/sizeof(indices[0]) );
591 AtlasManager::Vertex2D vertices[ 4 ] = {
592 { Vector2( tlx + shadowOffset.x, tly + shadowOffset.y ), Vector2( ZERO, ZERO ) },
593 { Vector2( brx + shadowOffset.x, tly + shadowOffset.y ), Vector2( ONE, ZERO ) },
594 { Vector2( tlx + shadowOffset.x, bry + shadowOffset.y ), Vector2( ZERO, ONE ) },
595 { Vector2( brx + shadowOffset.x, bry + shadowOffset.y ), Vector2( ONE, ONE ) } };
597 quadVertices.SetData( vertices );
598 quadIndices.SetData( indices );
600 Geometry quadGeometry = Geometry::New();
601 quadGeometry.AddVertexBuffer( quadVertices );
602 quadGeometry.SetIndexBuffer( quadIndices );
604 Sampler sampler = Sampler::New( meshRecord.mBuffer, "sTexture" );
605 Material material = Material::New( mGlyphManager.GetEffectBufferShader() );
606 material.AddSampler( sampler );
608 Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
610 // Ensure shadow is behind the text...
611 renderer.SetDepthIndex( CONTENT_DEPTH_INDEX - 1 );
612 Actor actor = Actor::New();
613 actor.AddRenderer( renderer );
614 actor.SetSize( 1.0f, 1.0f );
616 // Create a sub actor to render the source with normalized vertex positions
617 Vector< AtlasManager::Vertex2D > normVertexList;
618 for ( uint32_t i = 0; i < verts.Size(); ++i )
620 AtlasManager::Vertex2D vertex = verts[ i ];
621 vertex.mPosition.x = ( ( vertex.mPosition.x - tlx ) * divWidth ) - ONE;
622 vertex.mPosition.y = ( ( vertex.mPosition.y - tly ) * divHeight ) - ONE;
623 normVertexList.PushBack( vertex );
626 PropertyBuffer normVertices = PropertyBuffer::New( mQuadVertexFormat, normVertexList.Size() );
627 PropertyBuffer normIndices = PropertyBuffer::New( mQuadIndexFormat, meshRecord.mMesh.mIndices.Size() );
628 normVertices.SetData( const_cast< AtlasManager::Vertex2D* >( &normVertexList[ 0 ] ) );
629 normIndices.SetData( const_cast< unsigned int* >( &meshRecord.mMesh.mIndices[ 0 ] ) );
631 Geometry normGeometry = Geometry::New();
632 normGeometry.AddVertexBuffer( normVertices );
633 normGeometry.SetIndexBuffer( normIndices );
635 Material normMaterial = Material::New( mGlyphManager.GetGlyphShadowShader() );
636 Sampler normSampler = mGlyphManager.GetSampler( meshRecord.mAtlasId );
637 normMaterial.AddSampler( normSampler );
638 Dali::Renderer normRenderer = Dali::Renderer::New( normGeometry, normMaterial );
639 Actor subActor = Actor::New();
640 subActor.AddRenderer( normRenderer );
641 subActor.SetSize( 1.0f, 1.0f );
642 subActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
643 subActor.SetColor( shadowColor );
645 // Create a render task to render the effect
646 RenderTask task = Stage::GetCurrent().GetRenderTaskList().CreateTask();
647 task.SetTargetFrameBuffer( meshRecord.mBuffer );
648 task.SetSourceActor( subActor );
649 task.SetClearEnabled( true );
650 task.SetClearColor( Vector4::ZERO );
651 task.SetExclusive( true );
652 task.SetRefreshRate( RenderTask::REFRESH_ONCE );
653 task.FinishedSignal().Connect( this, &AtlasRenderer::Impl::RenderComplete );
654 actor.Add( subActor );
659 void RenderComplete( RenderTask& renderTask )
661 // Disconnect and remove this single shot render task
662 renderTask.FinishedSignal().Disconnect( this, &AtlasRenderer::Impl::RenderComplete );
663 Stage::GetCurrent().GetRenderTaskList().RemoveTask( renderTask );
665 // Get the actor used for render to buffer and remove it from the parent
666 Actor renderActor = renderTask.GetSourceActor();
669 Actor parent = renderActor.GetParent();
672 parent.Remove( renderActor );
677 Actor mActor; ///< The actor parent which renders the text
678 AtlasGlyphManager mGlyphManager; ///< Glyph Manager to handle upload and caching
679 Vector< uint32_t > mImageIds; ///< A list of imageIDs used by the renderer
680 TextAbstraction::FontClient mFontClient; ///> The font client used to supply glyph information
681 std::vector< MaxBlockSize > mBlockSizes; ///> Maximum size needed to contain a glyph in a block within a new atlas
682 std::vector< uint32_t > mFace; ///> Face indices for a quad
683 Property::Map mQuadVertexFormat;
684 Property::Map mQuadIndexFormat;
687 Text::RendererPtr AtlasRenderer::New()
689 DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Text::AtlasRenderer::New()\n" );
691 return Text::RendererPtr( new AtlasRenderer() );
694 Actor AtlasRenderer::Render( Text::ViewInterface& view )
696 UnparentAndReset( mImpl->mActor );
698 Length numberOfGlyphs = view.GetNumberOfGlyphs();
700 if( numberOfGlyphs > 0u )
702 Vector<GlyphInfo> glyphs;
703 glyphs.Resize( numberOfGlyphs );
705 std::vector<Vector2> positions;
706 positions.resize( numberOfGlyphs );
708 numberOfGlyphs = view.GetGlyphs( glyphs.Begin(),
712 glyphs.Resize( numberOfGlyphs );
713 positions.resize( numberOfGlyphs );
715 mImpl->AddGlyphs( positions,
718 view.GetShadowOffset(),
719 view.GetShadowColor(),
720 view.IsUnderlineEnabled(),
721 view.GetUnderlineColor(),
722 view.GetUnderlineHeight() );
725 return mImpl->mActor;
728 AtlasRenderer::AtlasRenderer()
734 AtlasRenderer::~AtlasRenderer()