Changed Atlas manager to use Dali::Texture instead of Dali::Atlas
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / rendering / atlas / text-atlas-renderer.cpp
index 966deff..3ee577f 100644 (file)
@@ -38,7 +38,7 @@ using namespace Dali::Toolkit::Text;
 namespace
 {
 #if defined(DEBUG_ENABLED)
-  Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_RENDERING");
+  Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_RENDERING");
 #endif
 
 const float ZERO( 0.0f );
@@ -289,7 +289,7 @@ struct AtlasRenderer::Impl
           }
 
           // Create a new image for the glyph
-          BufferImage bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
+          PixelData bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
           if( bitmap )
           {
             MaxBlockSize& blockSize = mBlockSizes[currentBlockSize];
@@ -433,6 +433,9 @@ struct AtlasRenderer::Impl
             renderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, depthIndex - 1 );
             containerActor.Add( shadowActor );
             containerActor.Add( actor );
+#if defined(DEBUG_ENABLED)
+            containerActor.SetName("TextContainer");
+#endif
             actor = containerActor;
           }
         }
@@ -493,7 +496,7 @@ struct AtlasRenderer::Impl
     Shader shader( mGlyphManager.GetShader( meshRecord.mAtlasId ) );
     Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, shader );
     renderer.SetTextures( textureSet );
-    renderer.SetProperty( Dali::Renderer::Property::BLENDING_MODE, BlendingMode::ON );
+    renderer.SetProperty( Dali::Renderer::Property::BLEND_MODE, BlendMode::ON );
     renderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, DepthIndex::CONTENT + mDepth );
     Actor actor = Actor::New();
 #if defined(DEBUG_ENABLED)
@@ -504,7 +507,6 @@ struct AtlasRenderer::Impl
     // Keep all of the origins aligned
     actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
     actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
     actor.SetSize( actorSize );
     actor.RegisterProperty("uOffset", Vector2::ZERO );
     return actor;
@@ -687,22 +689,26 @@ struct AtlasRenderer::Impl
       vert.mPosition.y = baseLine;
       vert.mTexCoords.x = ZERO;
       vert.mTexCoords.y = ZERO;
+      vert.mColor = underlineColor;
       newMesh.mVertices.PushBack( vert );
 
       vert.mPosition.x = brx;
       vert.mPosition.y = baseLine;
       vert.mTexCoords.x = u;
+      vert.mColor = underlineColor;
       newMesh.mVertices.PushBack( vert );
 
       vert.mPosition.x = tlx;
       vert.mPosition.y = baseLine + thickness;
       vert.mTexCoords.x = ZERO;
       vert.mTexCoords.y = v;
+      vert.mColor = underlineColor;
       newMesh.mVertices.PushBack( vert );
 
       vert.mPosition.x = brx;
       vert.mPosition.y = baseLine + thickness;
       vert.mTexCoords.x = u;
+      vert.mColor = underlineColor;
       newMesh.mVertices.PushBack( vert );
 
       // Six indices in counter clockwise winding
@@ -714,8 +720,6 @@ struct AtlasRenderer::Impl
       newMesh.mIndices.PushBack( faceIndex + 1u );
       faceIndex += 4;
 
-      vert.mColor = underlineColor;
-
       Toolkit::Internal::AtlasMeshFactory::AppendMesh( meshRecords[ index ].mMesh, newMesh );
     }
   }
@@ -738,6 +742,8 @@ Text::RendererPtr AtlasRenderer::New()
 
 Actor AtlasRenderer::Render( Text::ViewInterface& view, int depth )
 {
+  DALI_LOG_INFO( gLogFilter, Debug::General, "Text::AtlasRenderer::Render()\n" );
+
   UnparentAndReset( mImpl->mActor );
 
   Length numberOfGlyphs = view.GetNumberOfGlyphs();