Removed Text Basic Renderer and other minor fixes 74/42574/4
authorDavid Fumanal <d.fumanal@samsung.com>
Tue, 30 Jun 2015 08:22:11 +0000 (09:22 +0100)
committerDavid Fumanal <d.fumanal@samsung.com>
Tue, 30 Jun 2015 13:02:45 +0000 (06:02 -0700)
Change-Id: Ibfcdd221431de0969d905bfe77b9cb2956cec8b1

automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp [deleted file]
dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h [deleted file]
dali-toolkit/internal/text/rendering/text-backend-impl.cpp
dali-toolkit/public-api/text/rendering-backend.h

index b5d7a5d..8597e4b 100644 (file)
@@ -293,8 +293,8 @@ int UtcDaliTextFieldSetPropertyP(void)
   DALI_TEST_EQUALS( field.GetProperty<Vector4>( TextField::Property::SELECTION_HIGHLIGHT_COLOR ), LIGHT_BLUE, TEST_LOCATION );
 
   // Check the render backend property.
-  field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
-  DALI_TEST_EQUALS( field.GetProperty<unsigned int>( TextField::Property::RENDERING_BACKEND ), Text::RENDERING_BASIC, TEST_LOCATION );
+  field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+  DALI_TEST_EQUALS( field.GetProperty<unsigned int>( TextField::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
 
   // Check text property.
   field.SetProperty( TextField::Property::TEXT, "Setting Text" );
@@ -387,34 +387,6 @@ int UtcDaliTextFieldSetPropertyP(void)
   END_TEST;
 }
 
-// Positive Basic Text Renderer test
-int utcDaliTextFieldBasicRenderP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline("UtcDaliToolkitTextFieldBasicRenderP");
-  TextField field = TextField::New();
-  DALI_TEST_CHECK( field );
-
-  field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN" );
-
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-
-  Stage::GetCurrent().Add( field );
-
-  try
-  {
-    // Render some text with the basic backend
-    field.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
-    application.SendNotification();
-    application.Render();
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-  END_TEST;
-}
-
 // Positive Atlas Text Renderer test
 int utcDaliTextFieldAtlasRenderP(void)
 {
@@ -452,7 +424,7 @@ int utcDaliTextFieldTextChangedP(void)
   tet_infoline(" utcDaliTextFieldTextChangedP");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-/*
+
   Stage::GetCurrent().Add( field );
 
   field.TextChangedSignal().Connect(&TestTextChangedCallback);
@@ -468,7 +440,7 @@ int utcDaliTextFieldTextChangedP(void)
   gTextChangedCallBackCalled = false;
   application.ProcessEvent( GenerateKey( "D", "D", 0, 0, 0, Integration::KeyEvent::Down ) );
   DALI_TEST_CHECK( gTextChangedCallBackCalled );
-*/
+
   END_TEST;
 }
 
@@ -509,10 +481,10 @@ int utcDaliTextFieldMaxCharactersReachedP(void)
   gMaxCharactersCallBackCalled = false;
   field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
 
-  //application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
-  //application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
 
-  //DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
+  DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
 
   END_TEST;
 }
@@ -535,10 +507,10 @@ int utcDaliTextFieldMaxCharactersReachedN(void)
   gMaxCharactersCallBackCalled = false;
   field.MaxLengthReachedSignal().Connect(&TestMaxLengthReachedCallback);
 
-  //application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
-  //application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "a", "a", 0, 0, 0, Integration::KeyEvent::Down ) );
 
-  //DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
+  DALI_TEST_CHECK( !gMaxCharactersCallBackCalled );
 
   END_TEST;
 }
@@ -639,7 +611,7 @@ int utcDaliTextFieldEvent02(void)
 
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
-/*
+
   Stage::GetCurrent().Add( field );
 
   field.SetSize( 300.f, 50.f );
@@ -696,7 +668,7 @@ int utcDaliTextFieldEvent02(void)
   CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) );
   DALI_TEST_CHECK( camera );
 
-  RenderableActor renderer = RenderableActor::DownCast( offscreenRoot.GetChildAt( 1u ) );
+  Renderer renderer = offscreenRoot.GetChildAt( 1u ).GetRendererAt( 0u );
   DALI_TEST_CHECK( renderer );
 
   // Move the cursor and check the position changes.
@@ -767,7 +739,7 @@ int utcDaliTextFieldEvent02(void)
 
   // Should not be renderer.
   DALI_TEST_EQUALS( offscreenRoot.GetChildCount(), 1u, TEST_LOCATION ); // The camera actor only.
-*/
+
   END_TEST;
 }
 
@@ -818,8 +790,8 @@ int utcDaliTextFieldEvent03(void)
   CameraActor camera = CameraActor::DownCast( offscreenRoot.GetChildAt( 0u ) );
   DALI_TEST_CHECK( camera );
 
-  //RenderableActor renderer = RenderableActor::DownCast( offscreenRoot.GetChildAt( 1u ) );
-  //DALI_TEST_CHECK( renderer );
+  Renderer renderer = offscreenRoot.GetChildAt( 1u ).GetRendererAt( 0u );
+  DALI_TEST_CHECK( renderer );
 
   Renderer highlight = offscreenRoot.GetChildAt( 2u ).GetRendererAt( 0u );
   DALI_TEST_CHECK( highlight );
index 637907a..21b3c8b 100644 (file)
@@ -177,8 +177,8 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR ), Color::BLACK, TEST_LOCATION );
   DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT ), 0.0f, TEST_LOCATION );
 
-  label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
-  DALI_TEST_EQUALS( label.GetProperty<unsigned int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_BASIC, TEST_LOCATION );
+  label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+  DALI_TEST_EQUALS( label.GetProperty<unsigned int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
 
   // Check that text can be correctly reset
   label.SetProperty( TextLabel::Property::TEXT, "Setting Text" );
@@ -229,42 +229,13 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   END_TEST;
 }
 
-int UtcDaliToolkitTextlabelBasicRenderP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliToolkitTextLabelBasicRenderP");
-  TextLabel label = TextLabel::New("Test Text");
-  DALI_TEST_CHECK( label );
-
-  // Avoid a crash when core load gl resources.
-  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
-
-  Stage::GetCurrent().Add( label );
-
-  label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "BEGIN" );
-  label.SetProperty( TextLabel::Property::MULTI_LINE, true );
-
-  try
-  {
-    // Render some text with the basic backend
-    label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_BASIC );
-    //application.SendNotification();
-    //application.Render();
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-  END_TEST;
-}
-
 int UtcDaliToolkitTextlabelAtlasRenderP(void)
 {
   ToolkitTestApplication application;
   tet_infoline(" UtcDaliToolkitTextLabelAtlasRenderP");
   TextLabel label = TextLabel::New("Test Text");
   DALI_TEST_CHECK( label );
-/*
+
   // Avoid a crash when core load gl resources.
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
 
@@ -289,7 +260,7 @@ int UtcDaliToolkitTextlabelAtlasRenderP(void)
   {
     tet_result(TET_FAIL);
   }
-  */
+
   END_TEST;
 }
 
index 9bc5bc4..807c3a2 100644 (file)
@@ -80,7 +80,6 @@ toolkit_src_files = \
    $(toolkit_src_dir)/text/rendering/atlas/text-atlas-renderer.cpp \
    $(toolkit_src_dir)/text/rendering/atlas/atlas-glyph-manager.cpp \
    $(toolkit_src_dir)/text/rendering/atlas/atlas-glyph-manager-impl.cpp \
-   $(toolkit_src_dir)/text/rendering/basic/text-basic-renderer.cpp \
    $(toolkit_src_dir)/text/rendering/shaders/text-basic-shader.cpp \
    $(toolkit_src_dir)/text/rendering/shaders/text-basic-shadow-shader.cpp \
    $(toolkit_src_dir)/text/rendering/shaders/text-bgra-shader.cpp \
diff --git a/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp b/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp
deleted file mode 100644 (file)
index 52548d9..0000000
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h>
-
-// EXTERNAL INCLUDES
-#include <dali/devel-api/text-abstraction/font-client.h>
-#include <dali/public-api/actors/image-actor.h>
-#include <dali/devel-api/images/atlas.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/line-run.h>
-#include <dali-toolkit/internal/text/rendering/shaders/text-basic-shader.h>
-#include <dali-toolkit/internal/text/rendering/shaders/text-bgra-shader.h>
-
-
-using namespace Dali;
-using namespace Dali::Toolkit;
-using namespace Dali::Toolkit::Text;
-
-namespace
-{
-
-#if defined(DEBUG_ENABLED)
-  Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_RENDERING");
-#endif
-
-const std::size_t PADDING = 2; //< To avoid GL filtering artefacts
-
-struct TextureCoordinates
-{
-  TextureCoordinates()
-  : topLeft( 0.0f, 0.0f ),
-    topRight( 1.0f, 0.0f ),
-    bottomLeft( 0.0f, 1.0f ),
-    bottomRight( 1.0f, 1.0f )
-  {
-  }
-
-  Vector2 topLeft;
-  Vector2 topRight;
-  Vector2 bottomLeft;
-  Vector2 bottomRight;
-};
-
-struct AtlasGlyph
-{
-  AtlasGlyph()
-  : fontId( 0 ),
-    index( 0 ),
-    xOffset( 0 ),
-    width( 0 ),
-    height( 0 )
-  {
-  }
-
-  AtlasGlyph( FontId id,
-              GlyphIndex glyphIndex,
-              std::size_t offset,
-              std::size_t widthPixels,
-              std::size_t heightPixels,
-              BufferImage bitmap )
-  : fontId( id ),
-    index( glyphIndex ),
-    xOffset( offset ),
-    width( widthPixels ),
-    height( heightPixels ),
-    mBitmap( bitmap )
-  {
-  }
-
-  FontId fontId;
-  GlyphIndex index;
-  std::size_t xOffset;
-  std::size_t width;
-  std::size_t height;
-  BufferImage mBitmap;
-  TextureCoordinates coords;
-};
-
-} // unnamed namespace
-
-struct BasicRenderer::Impl
-{
-  /**
-   * @brief Create the renderer implementation.
-   */
-  Impl()
-  : mWidthL8( 0.0f ),
-    mHeightL8( 0.0f ),
-    mWidthBGRA8888( 0.0f ),
-    mHeightBGRA8888( 0.0f )
-  {
-    mFontClient = TextAbstraction::FontClient::Get();
-  }
-
-  /**
-   * @brief Reset the previous glyph calculations.
-   *
-   * @param[in] size The glyph space to reserve.
-   */
-  void Reset( std::size_t size )
-  {
-    mWidthL8 = 0.0f;
-    mHeightL8 = 0.0f;
-    mWidthBGRA8888 = 0.0f;
-    mHeightBGRA8888 = 0.0f;
-    mGlyphs.clear();
-    mGlyphs.reserve( size );
-    mAtlasL8.Reset();
-    mAtlasBGRA8888.Reset();
-  }
-
-  /**
-   * @brief Ccreate an Atlas, uploading the necessary glyph bitmaps
-   *
-   * @param[in] glyphs The glyphs to upload.
-   */
-  void CreateAtlases( const Vector<GlyphInfo>& glyphs )
-  {
-    // Clear previous atlas
-    Reset( glyphs.Count() );
-
-    for( unsigned int i=0; i<glyphs.Count(); ++i )
-    {
-      float width  = glyphs[i].width;
-      float height = glyphs[i].height;
-
-      if( width > 0 &&
-          height > 0 ) // skip whitespace
-      {
-        if( !GlyphFound( glyphs[i].fontId, glyphs[i].index ) )
-        {
-          AddGlyph( glyphs[i] );
-        }
-      }
-    }
-
-    mAtlasL8 = CreateAtlas( mWidthL8, mHeightL8, Pixel::L8 );
-    mAtlasBGRA8888 = CreateAtlas( mWidthBGRA8888, mHeightBGRA8888, Pixel::BGRA8888 );
-  }
-
-  Atlas CreateAtlas( unsigned int width, unsigned int height, Pixel::Format format )
-  {
-    Atlas atlas;
-
-    if( width > 0 && height > 0 )
-    {
-      atlas = Atlas::New( width, height, format );
-
-      for( unsigned int i=0; i<mGlyphs.size(); ++i )
-      {
-        AtlasGlyph& glyph = mGlyphs[i];
-
-        const Pixel::Format glyphFormat = glyph.mBitmap.GetPixelFormat();
-
-        if( format == glyphFormat )
-        {
-          atlas.Upload( glyph.mBitmap, glyph.xOffset, 0 );
-
-          TextureCoordinates& coords = glyph.coords;
-          coords.topLeft.x     = static_cast<float>(glyph.xOffset) / static_cast<float>(width);
-          coords.topLeft.y     = 0.0f;
-          coords.topRight.x    = static_cast<float>(glyph.xOffset + glyph.width) / static_cast<float>(width);
-          coords.topRight.y    = 0.0f;
-          coords.bottomLeft.x  = static_cast<float>(glyph.xOffset) / static_cast<float>(width);
-          coords.bottomLeft.y  = static_cast<float>(glyph.height) / static_cast<float>(height);
-          coords.bottomRight.x = static_cast<float>(glyph.xOffset + glyph.width) / static_cast<float>(width);
-          coords.bottomRight.y = static_cast<float>(glyph.height) / static_cast<float>(height);
-        }
-      }
-    }
-
-    return atlas;
-  }
-
-  /**
-   * @brief Check whether we already have the glyph.
-   */
-  bool GlyphFound( FontId fontId, GlyphIndex index ) const
-  {
-    for( unsigned int i=0; i<mGlyphs.size(); ++i )
-    {
-      const AtlasGlyph& glyph = mGlyphs[i];
-
-      if( fontId == glyph.fontId &&
-          index  == glyph.index )
-      {
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  /**
-   * @brief Add the glyph.
-   */
-  void AddGlyph( const GlyphInfo& glyphInfo )
-  {
-    BufferImage bitmap = mFontClient.CreateBitmap( glyphInfo.fontId, glyphInfo.index );
-
-    const Pixel::Format format = bitmap.GetPixelFormat();
-
-    if( Pixel::L8 == format )
-    {
-      mGlyphs.push_back( AtlasGlyph( glyphInfo.fontId, glyphInfo.index, mWidthL8, glyphInfo.width, glyphInfo.height, bitmap ) );
-
-      // Increase the Atlas width/height
-      mWidthL8 += glyphInfo.width + PADDING;
-      if( mHeightL8 < glyphInfo.height + PADDING )
-      {
-        mHeightL8 = glyphInfo.height + PADDING;
-      }
-    }
-    else if ( Pixel::BGRA8888 == format )
-    {
-       mGlyphs.push_back( AtlasGlyph( glyphInfo.fontId, glyphInfo.index, mWidthBGRA8888, glyphInfo.width, glyphInfo.height, bitmap ) );
-
-      // A separate Atlas is used for color Emojis
-      mWidthBGRA8888 += glyphInfo.width + PADDING;
-      if( mHeightBGRA8888 < glyphInfo.height + PADDING )
-      {
-        mHeightBGRA8888 = glyphInfo.height + PADDING;
-      }
-    }
-  }
-
-  /**
-   * @brief Get the texture coordinates for a glyph.
-   */
-  bool GetTextureCoordinates( Pixel::Format format, FontId fontId, GlyphIndex index, TextureCoordinates& coords )
-  {
-    for( unsigned int i=0; i<mGlyphs.size(); ++i )
-    {
-      const AtlasGlyph& glyph = mGlyphs[i];
-
-      const Pixel::Format glyphFormat = glyph.mBitmap.GetPixelFormat();
-
-      if( format == glyphFormat &&
-          fontId == glyph.fontId &&
-          index  == glyph.index )
-      {
-        coords = glyph.coords;
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  /**
-   * @brief Helper method to create a mesh with one quad per glyph.
-   *
-   * @param[in] glyphs The glyphs to display.
-   * @param[in] positions The 2D positions of the glyphs.
-   * @param[in] image The material uses this as a diffuse texture.
-   */
-  /*
-  Mesh CreateMesh( const Vector<GlyphInfo>& glyphs, const std::vector<Vector2>& positions, Pixel::Format format, Image image )
-  {
-    MeshData::VertexContainer vertices( 4 * glyphs.Count() ); // 1 quad per glyph
-
-    MeshData::FaceIndices faces;
-    faces.reserve( 6 * glyphs.Count() ); // 2 triangles per quad
-
-    for( unsigned int i=0; i<glyphs.Count(); ++i )
-    {
-      float width  = glyphs[i].width;
-      float height = glyphs[i].height;
-
-      if( width > 0 &&
-          height > 0 ) // skip whitespace
-      {
-        const Vector2& position = positions[i];
-
-        TextureCoordinates coords;
-        if( GetTextureCoordinates( format, glyphs[i].fontId, glyphs[i].index, coords ) )
-        {
-          vertices[ i*4 + 0 ] = MeshData::Vertex( Vector3( position.x + 0.0f*width, position.y + 0.0f*height, 0.0f ), coords.topLeft,     Vector3( 1.0f, 0.0f, 0.0f ) );
-          vertices[ i*4 + 1 ] = MeshData::Vertex( Vector3( position.x + 1.0f*width, position.y + 0.0f*height, 0.0f ), coords.topRight,    Vector3( 1.0f, 1.0f, 0.0f ) );
-          vertices[ i*4 + 2 ] = MeshData::Vertex( Vector3( position.x + 0.0f*width, position.y + 1.0f*height, 0.0f ), coords.bottomLeft,  Vector3( 0.0f, 1.0f, 0.0f ) );
-          vertices[ i*4 + 3 ] = MeshData::Vertex( Vector3( position.x + 1.0f*width, position.y + 1.0f*height, 0.0f ), coords.bottomRight, Vector3( 0.0f, 0.0f, 1.0f ) );
-
-          faces.push_back( i*4 + 0 ); faces.push_back( i*4 + 3 ); faces.push_back( i*4 + 1 );
-          faces.push_back( i*4 + 0 ); faces.push_back( i*4 + 2 ); faces.push_back( i*4 + 3 );
-        }
-      }
-    }
-
-    Material material = Material::New( "Material" );
-    material.SetDiffuseTexture( image );
-
-    // Create the mesh data from the vertices and faces
-    MeshData meshData;
-    meshData.SetHasColor( false );
-    meshData.SetMaterial( material );
-    meshData.SetVertices( vertices );
-    meshData.SetFaceIndices( faces );
-
-    // Create a mesh from the data
-    Dali::Mesh mesh = Mesh::New( meshData );
-    return mesh;
-  }
-  */
-  Actor mActor; ///< The actor which renders the text
-
-  Atlas mAtlasL8;
-  unsigned int mWidthL8;
-  unsigned int mHeightL8;
-
-  // A separate Atlas is used for color Emojis
-  Atlas mAtlasBGRA8888;
-  unsigned int mWidthBGRA8888;
-  unsigned int mHeightBGRA8888;
-
-  std::vector<AtlasGlyph> mGlyphs;
-
-  TextAbstraction::FontClient mFontClient;
-};
-
-Text::RendererPtr BasicRenderer::New()
-{
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Text::BasicRenderer::New()\n" );
-
-  return Text::RendererPtr( new BasicRenderer() );
-}
-
-Actor BasicRenderer::Render( Text::ViewInterface& view, unsigned int depth )
-{
-  // Remove the previous text
-  UnparentAndReset( mImpl->mActor );
-
-  Length numberOfGlyphs = view.GetNumberOfGlyphs();
-
-  if( numberOfGlyphs > 0u )
-  {
-    Vector<GlyphInfo> glyphs;
-    glyphs.Resize( numberOfGlyphs );
-
-    std::vector<Vector2> positions;
-    positions.resize( numberOfGlyphs );
-
-    numberOfGlyphs = view.GetGlyphs( glyphs.Begin(),
-                                     &positions[0],
-                                     0u,
-                                     numberOfGlyphs );
-
-    glyphs.Resize( numberOfGlyphs );
-    positions.resize( numberOfGlyphs );
-
-    mImpl->CreateAtlases( glyphs );
-
-    Actor actorL8;
-    if( mImpl->mAtlasL8 )
-    {
-      //actorL8 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::L8, mImpl->mAtlasL8 ) );
-      actorL8.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
-
-      ShaderEffect shader = BasicShader::New();
-      //actorL8.SetShaderEffect( shader );
-    }
-
-    Actor actorBGRA8888;
-    if( mImpl->mAtlasBGRA8888 )
-    {
-      //actorBGRA8888 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::BGRA8888, mImpl->mAtlasBGRA8888 ) );
-      actorBGRA8888.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
-
-      ShaderEffect shader = BgraShader::New();
-      //actorBGRA8888.SetShaderEffect( shader );
-    }
-
-    // If we have both monochrome & color glyphs, two mesh actors are returned in a container
-    if( actorL8 && actorBGRA8888 )
-    {
-      mImpl->mActor = ImageActor::New();
-      mImpl->mActor.Add( actorL8 );
-      mImpl->mActor.Add( actorBGRA8888 );
-    }
-    else
-    {
-      if( actorL8 )
-      {
-        mImpl->mActor = actorL8;
-      }
-      else if( actorBGRA8888 )
-      {
-        mImpl->mActor = actorBGRA8888;
-      }
-    }
-  }
-
-  return mImpl->mActor;
-}
-
-BasicRenderer::BasicRenderer()
-{
-  mImpl = new Impl();
-}
-
-BasicRenderer::~BasicRenderer()
-{
-  delete mImpl;
-}
diff --git a/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h b/dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h
deleted file mode 100644 (file)
index 793c277..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef __DALI_TOOLKIT_TEXT_BASIC_RENDERER_H__
-#define __DALI_TOOLKIT_TEXT_BASIC_RENDERER_H__
-
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/rendering/text-renderer.h>
-#include <dali-toolkit/internal/text/text-definitions.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Text
-{
-
-/**
- * @brief A reference implementation of Text::Renderer.
- *
- * This is intended for testing & performance comparisons with more complex solutions.
- * Each basic renderer creates its own texture atlas, and uses a simple packing algorithm,
- * in which glyphs are stored in a single row.
- */
-class BasicRenderer : public Renderer
-{
-public:
-
-  /**
-   * @brief Create the renderer.
-   */
-  static RendererPtr New();
-
-  /**
-   * @brief Render the glyphs from a ViewInterface.
-   *
-   * @param[in] view The interface to a view.
-   * @param[in] depth The tree depth of the parent.
-   * .
-   * @return The Renderable actor used to position the text.
-   */
-  virtual Actor Render( ViewInterface& view, unsigned int depth );
-
-protected:
-
-  /**
-   * @brief Constructor.
-   */
-  BasicRenderer();
-
-  /**
-   * @brief A reference counted object may only be deleted by calling Unreference().
-   */
-  virtual ~BasicRenderer();
-
-private:
-
-  // Undefined
-  BasicRenderer( const BasicRenderer& handle );
-
-  // Undefined
-  BasicRenderer& operator=( const BasicRenderer& handle );
-
-private:
-
-  struct Impl;
-  Impl* mImpl;
-};
-
-} // namespace Text
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_TEXT_BASIC_RENDERER_H__
index a438a3c..f9f15df 100644 (file)
@@ -25,7 +25,6 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/text/rendering-backend.h>
 #include <dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.h>
-#include <dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h>
 
 namespace Dali
 {
@@ -86,12 +85,6 @@ RendererPtr Backend::NewRenderer( unsigned int renderingType )
 
   switch( renderingType )
   {
-    case Dali::Toolkit::Text::RENDERING_BASIC:
-    {
-      renderer = Dali::Toolkit::Text::BasicRenderer::New();
-    }
-    break;
-
     case Dali::Toolkit::Text::RENDERING_SHARED_ATLAS:
     {
       renderer = Dali::Toolkit::Text::AtlasRenderer::New();
index 522a307..1ffa35e 100644 (file)
@@ -30,7 +30,6 @@ namespace Text
 // The type of text renderer required
 enum RenderingType
 {
-  RENDERING_BASIC,       ///< A bitmap-based reference implementation
   RENDERING_SHARED_ATLAS ///< A bitmap-based solution where renderers can share a texture atlas
 };