Merge remote-tracking branch 'origin/tizen' into devel/new_mesh 99/39599/1
authorFrancisco Santos <f1.santos@samsung.com>
Tue, 19 May 2015 10:05:42 +0000 (11:05 +0100)
committerFrancisco Santos <f1.santos@samsung.com>
Tue, 19 May 2015 10:05:42 +0000 (11:05 +0100)
Conflicts:
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/atlas-manager/atlas-manager.h
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h
dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-controller-impl.h
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
docs/content/main-page.h
docs/content/programming-guide/script-overview.h
packaging/dali-toolkit.spec

Change-Id: I672b8fe4c79dcabd9a3fe323ad55a1a368cc0b0e

16 files changed:
1  2 
automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp
dali-toolkit/internal/atlas-manager/atlas-manager.h
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.cpp
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/rendering/basic/text-basic-renderer.cpp
dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.cpp
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/file.list

@@@ -19,9 -19,9 +19,9 @@@
  #include <stdlib.h>
  #include <string.h>
  #include <sstream>
  #include <dali-toolkit-test-suite-utils.h>
  #include <dali-toolkit/dali-toolkit.h>
+ #include <dali/integration-api/events/pan-gesture-event.h>
  
  using namespace Dali;
  using namespace Dali::Toolkit;
@@@ -371,7 -371,6 +371,7 @@@ int UtcDaliPageTurnViewEnterLeaveEditMo
    factory.EnableOffscreenRendering( );
  
    PageTurnView pageTurnView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
 +  pageTurnView.SetRelayoutEnabled( false );
    pageTurnView.SetPositionInheritanceMode( USE_PARENT_POSITION );
    Stage::GetCurrent().Add( pageTurnView );
  
@@@ -423,7 -422,6 +423,7 @@@ int UtcDaliPageTurnViewGetHitActor(void
    factory.EnableOffscreenRendering( );
  
    PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
 +  pageTurnView.SetRelayoutEnabled( false );
    pageTurnView.SetParentOrigin( ParentOrigin::TOP_LEFT );
    pageTurnView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
    Stage::GetCurrent().Add( pageTurnView );
@@@ -460,7 -458,6 +460,7 @@@ int UtcDaliPageTurnViewRefresh(void
    TestPageFactory factory(application);
    factory.EnableOffscreenRendering( );
    PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
 +  pageTurnView.SetRelayoutEnabled( false );
    pageTurnView.SetParentOrigin( ParentOrigin::TOP_LEFT );
    pageTurnView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
    Stage::GetCurrent().Add( pageTurnView );
@@@ -501,7 -498,6 +501,7 @@@ int UtcDaliPageTurnViewSignals(void
    TestPageFactory factory(application);
    Vector2 size = Stage::GetCurrent().GetSize();
    PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
 +  portraitView.SetRelayoutEnabled( false );
    portraitView.SetPositionInheritanceMode( USE_PARENT_POSITION );
    Stage::GetCurrent().Add( portraitView );
  
@@@ -197,7 -197,6 +197,7 @@@ int UtcDaliSuperBlurViewGetBlurredImage
    tet_infoline( "UtcDaliSuperBlurViewGetBlurredImage" );
  
    SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
 +  blurView.SetRelayoutEnabled( false );
    blurView.SetSize( 100.f,100.f );
    Image inputImage = CreateSolidColorImage( application, Color::GREEN, 100, 100 );
    blurView.SetImage( inputImage );
    DALI_TEST_CHECK( image1 );
  
    Image image2 = blurView.GetBlurredImage( 2 );
-   DALI_TEST_EQUALS( image2.GetWidth(), 25, TEST_LOCATION );
-   DALI_TEST_EQUALS( image2.GetHeight(), 25, TEST_LOCATION );
+   DALI_TEST_EQUALS( image2.GetWidth(), 25u, TEST_LOCATION );
+   DALI_TEST_EQUALS( image2.GetHeight(), 25u, TEST_LOCATION );
  
    Image image3 = blurView.GetBlurredImage( 3 );
    DALI_TEST_CHECK( FrameBufferImage::DownCast( image2 ) );
@@@ -20,9 -20,9 +20,9 @@@
  // EXTERNAL INCLUDES
  #include <stdint.h>
  #include <dali/public-api/common/dali-vector.h>
- #include <dali/public-api/images/atlas.h>
 -#include <dali/devel-api/geometry/mesh-data.h>
+ #include <dali/devel-api/images/atlas.h>
  #include <dali/public-api/images/buffer-image.h>
 +#include <dali/public-api/shader-effects/material.h>
  
  namespace Dali
  {
@@@ -187,18 -187,6 +187,18 @@@ public
      Dali::Vector< AtlasMetricsEntry > mAtlasMetrics;    // container of atlas information
    };
  
 +  struct Vertex2D
 +  {
 +    Vector2 mPosition;
 +    Vector2 mTexCoords;
 +  };
 +
 +  struct Mesh2D
 +  {
 +    Vector< Vertex2D > mVertices;
 +    Vector< unsigned int> mIndices;
 +  };
 +
    /**
     * Create an AtlasManager handle; this can be initialised with AtlasManager::New()
     * Calling member functions with an uninitialised handle is not allowed.
     */
    void GenerateMeshData( ImageId id,
                           const Vector2& position,
 -                         MeshData& mesh );
 +                         Mesh2D& mesh );
  
    /**
     * @brief Append second mesh to the first mesh
     * @param[in] second Second mesh
     * @param[in] optimize should we optimize vertex data
     */
 -  void StitchMesh( MeshData& first,
 -                   const MeshData& second,
 +  void StitchMesh( Mesh2D& first,
 +                   const Mesh2D& second,
                     bool optimize = false );
  
    /**
     * @param[in] optimize should we optimize vertex data
     * @param[out] out resulting mesh
     */
 -  void StitchMesh( const MeshData& first,
 -                   const MeshData& second,
 -                   MeshData& out,
 +  void StitchMesh( const Mesh2D& first,
 +                   const Mesh2D& second,
 +                   Mesh2D& out,
                     bool optimize = false );
  
    /**
     */
    void GetMetrics( Metrics& metrics );
  
 +  /**
 +   * @brief Get Material used by atlas
 +   *
 +   * @param atlas[in] atlas AtlasId
 +   *
 +   * @return Material used by atlas
 +   */
 +  Material GetMaterial( AtlasId atlas ) const;
 +
 + /**
 +   * @brief Get Sampler used by atlas
 +   *
 +   * @param atlas[in] atlas AtlasId
 +   *
 +   * @return Sampler used by atlas
 +   */
 +  Sampler GetSampler( AtlasId atlas ) const;
  private:
  
    explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager *impl);
  
  } // namespace Dali
  
--#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__
++#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__
  #include <dali/public-api/render-tasks/render-task-list.h>
  #include <dali/public-api/object/type-info.h>
  #include <dali/public-api/object/type-registry.h>
+ #include <dali/public-api/object/property-array.h>
  #include <dali/public-api/actors/layer.h>
  #include <dali/public-api/actors/image-actor.h>
  #include <dali/public-api/actors/camera-actor.h>
- #include <dali/public-api/scripting/scripting.h>
+ #include <dali/devel-api/scripting/scripting.h>
  #include <dali/integration-api/debug.h>
  
  // INTERNAL INCLUDES
@@@ -167,7 -168,7 +168,7 @@@ std::string PropertyValueToString( cons
      }
      case Property::ARRAY:
      {
-       ret = std::string("Array Size=") + ToString( value.Get<Property::Array>().size() );
+       ret = std::string("Array Size=") + ToString( value.Get<Property::Array>().Size() );
        break;
      }
      case Property::MAP:
@@@ -278,7 -279,7 +279,7 @@@ void Builder::SetProperties( const Tree
        // special field 'effect' references the shader effect instances
        if(key == "effect")
        {
 -        RenderableActor actor = RenderableActor::DownCast(handle);
 +        ImageActor actor = ImageActor::DownCast(handle);
          if( actor )
          {
            OptionalString str = constant.IsString( keyChild.second );
  
        if( Property::INVALID_INDEX == index )
        {
 -        RenderableActor actor = RenderableActor::DownCast(handle);
 +        ImageActor actor = ImageActor::DownCast(handle);
          if( actor )
          {
            if( ShaderEffect effect = actor.GetShaderEffect() )
@@@ -814,6 -815,212 +815,212 @@@ Path Builder::GetPath( const std::strin
    return ret;
  }
  
+ PathConstrainer Builder::GetPathConstrainer( const std::string& name )
+ {
+   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+   //Search the pathConstrainer in the LUT
+   size_t count( mPathConstrainerLut.size() );
+   for( size_t i(0); i!=count; ++i )
+   {
+     if( mPathConstrainerLut[i].name == name )
+     {
+       //PathConstrainer has already been created
+       return mPathConstrainerLut[i].pathConstrainer;
+     }
+   }
+   //Create a new PathConstrainer
+   PathConstrainer ret;
+   if( OptionalChild constrainers = IsChild( *mParser.GetRoot(), "constrainers") )
+   {
+     if( OptionalChild pathConstrainer = IsChild( *constrainers, name ) )
+     {
+       OptionalString constrainerType(IsString(IsChild(*pathConstrainer, "type")));
+       if(!constrainerType)
+       {
+         DALI_SCRIPT_WARNING("Constrainer type not specified for constrainer '%s'\n", name.c_str() );
+       }
+       else if( *constrainerType == "PathConstrainer")
+       {
+         //points property
+         if( OptionalChild pointsProperty = IsChild( *pathConstrainer, "points") )
+         {
+           Dali::Property::Value points(Property::ARRAY);
+           if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+           {
+             ret = PathConstrainer::New();
+             ret.SetProperty( PathConstrainer::Property::POINTS, points);
+             //control-points property
+             if( OptionalChild pointsProperty = IsChild( *pathConstrainer, "control-points") )
+             {
+               Dali::Property::Value points(Property::ARRAY);
+               if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+               {
+                 ret.SetProperty( PathConstrainer::Property::CONTROL_POINTS, points);
+               }
+               //Forward vector
+               OptionalVector3 forward( IsVector3( IsChild(*pathConstrainer, "forward" ) ) );
+               if( forward )
+               {
+                 ret.SetProperty( PathConstrainer::Property::FORWARD, *forward);
+               }
+               //Add the new constrainer to the vector of PathConstrainer
+               PathConstrainerEntry entry = {name,ret};
+               mPathConstrainerLut.push_back( entry );
+             }
+             else
+             {
+               //Control points not specified
+               DALI_SCRIPT_WARNING("Control points not specified for pathConstrainer '%s'\n", name.c_str() );
+             }
+           }
+         }
+         else
+         {
+           //Interpolation points not specified
+           DALI_SCRIPT_WARNING("Interpolation points not specified for pathConstrainer '%s'\n", name.c_str() );
+         }
+       }
+       else
+       {
+         DALI_SCRIPT_WARNING("Constrainer '%s' is not a PathConstrainer\n", name.c_str() );
+       }
+     }
+   }
+   return ret;
+ }
+ bool Builder::IsPathConstrainer( const std::string& name )
+ {
+   size_t count( mPathConstrainerLut.size() );
+   for( size_t i(0); i!=count; ++i )
+   {
+     if( mPathConstrainerLut[i].name == name )
+     {
+       return true;
+     }
+   }
+   if( OptionalChild constrainers = IsChild( *mParser.GetRoot(), "constrainers") )
+   {
+     if( OptionalChild constrainer = IsChild( *constrainers, name ) )
+     {
+       OptionalString constrainerType(IsString(IsChild(*constrainer, "type")));
+       if(!constrainerType)
+       {
+         return false;
+       }
+       else
+       {
+          return *constrainerType == "PathConstrainer";
+       }
+     }
+   }
+   return false;
+ }
+ Dali::LinearConstrainer Builder::GetLinearConstrainer( const std::string& name )
+ {
+   DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+   //Search the LinearConstrainer in the LUT
+   size_t count( mLinearConstrainerLut.size() );
+   for( size_t i(0); i!=count; ++i )
+   {
+     if( mLinearConstrainerLut[i].name == name )
+     {
+       //LinearConstrainer has already been created
+       return mLinearConstrainerLut[i].linearConstrainer;
+     }
+   }
+   //Create a new LinearConstrainer
+   LinearConstrainer ret;
+   if( OptionalChild constrainers = IsChild( *mParser.GetRoot(), "constrainers") )
+   {
+     if( OptionalChild linearConstrainer = IsChild( *constrainers, name ) )
+     {
+       OptionalString constrainerType(IsString(IsChild(*linearConstrainer, "type")));
+       if(!constrainerType)
+       {
+         DALI_SCRIPT_WARNING("Constrainer type not specified for constrainer '%s'\n", name.c_str() );
+       }
+       else if( *constrainerType == "LinearConstrainer")
+       {
+         //points property
+         if( OptionalChild pointsProperty = IsChild( *linearConstrainer, "value") )
+         {
+           Dali::Property::Value points(Property::ARRAY);
+           if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+           {
+             ret = Dali::LinearConstrainer::New();
+             ret.SetProperty( LinearConstrainer::Property::VALUE, points);
+             //control-points property
+             if( OptionalChild pointsProperty = IsChild( *linearConstrainer, "progress") )
+             {
+               Dali::Property::Value points(Property::ARRAY);
+               if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+               {
+                 ret.SetProperty( LinearConstrainer::Property::PROGRESS, points);
+               }
+             }
+             //Add the new constrainer to vector of LinearConstrainer
+             LinearConstrainerEntry entry = {name,ret};
+             mLinearConstrainerLut.push_back( entry );
+           }
+         }
+         else
+         {
+           //Interpolation points not specified
+           DALI_SCRIPT_WARNING("Values not specified for LinearConstrainer '%s'\n", name.c_str() );
+         }
+       }
+       else
+       {
+         DALI_SCRIPT_WARNING("Constrainer '%s' is not a LinearConstrainer\n", name.c_str() );
+       }
+     }
+   }
+   return ret;
+ }
+ bool Builder::IsLinearConstrainer( const std::string& name )
+ {
+   //Search the LinearConstrainer in the LUT
+   size_t count( mLinearConstrainerLut.size() );
+   for( size_t i(0); i!=count; ++i )
+   {
+     if( mLinearConstrainerLut[i].name == name )
+     {
+       return true;
+     }
+   }
+   if( OptionalChild constrainers = IsChild( *mParser.GetRoot(), "constrainers") )
+   {
+     if( OptionalChild constrainer = IsChild( *constrainers, name ) )
+     {
+       OptionalString constrainerType(IsString(IsChild(*constrainer, "type")));
+       if(!constrainerType)
+       {
+         return false;
+       }
+       else
+       {
+          return *constrainerType == "LinearConstrainer";
+       }
+     }
+   }
+   return false;
+ }
  Toolkit::Builder::BuilderSignalType& Builder::QuitSignal()
  {
    return mQuitSignal;
@@@ -20,7 -20,9 +20,7 @@@
  
  // EXTERNAL INCLUDES
  #include <math.h>
 -#include <dali/devel-api/actors/mesh-actor.h>
  #include <dali/public-api/animation/constraint.h>
 -#include <dali/devel-api/geometry/animatable-mesh.h>
  #include <dali/public-api/shader-effects/shader-effect.h>
  #include <dali/public-api/math/vector3.h>
  
@@@ -38,14 -40,14 +38,14 @@@ namespac
  // Bouncing effect is presented by stacked three layers with same color and opacity
  const size_t NUM_LAYERS( 3 );
  const Vector3 LAYER_HEIGHTS( 1.f, 27.f/42.f, 13.f/42.f);
--
++/*
  // use the actor color to paint every layer
  const char* MESH_FRAGMENT_SHADER =
  "void main()\n"
  "{\n"
  "  gl_FragColor = uColor;\n"
  "}\n";
--
++*/
  // Constraint to move the vertices vertically
  struct VertexPositionConstraint
  {
@@@ -68,6 -70,6 +68,8 @@@
  
  Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex )
  {
++  Actor meshActor;
++/*
    Dali::AnimatableMesh             mesh;
    Dali::MeshActor                  meshActor;
  
      constraint = Constraint::New<Vector3>( mesh, mesh.GetPropertyIndex(j+3,  AnimatableVertex::Property::POSITION), VertexPositionConstraint(-0.5f, LAYER_HEIGHTS[i]) );
      constraint.AddSource( Source(meshActor, bouncePropertyIndex) );
      constraint.Apply();
--  }
++  }*/
  
    return meshActor;
  }
  #include <dali/public-api/common/stage.h>
  #include <dali/public-api/images/resource-image.h>
  #include <dali/public-api/object/type-registry.h>
- #include <dali/public-api/object/type-registry-helper.h>
- #include <dali/public-api/scripting/scripting.h>
+ #include <dali/devel-api/object/type-registry-helper.h>
+ #include <dali/devel-api/scripting/scripting.h>
+ #include <dali/devel-api/adaptor-framework/virtual-keyboard.h>
  #include <dali/integration-api/debug.h>
- #include <dali/public-api/adaptor-framework/virtual-keyboard.h>
  
  // INTERNAL INCLUDES
  #include <dali-toolkit/public-api/text/rendering-backend.h>
@@@ -48,10 -48,16 +48,16 @@@ namespace Toolki
  namespace Internal
  {
  
- namespace
+ namespace // unnamed namespace
  {
+ #if defined(DEBUG_ENABLED)
+   Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_CONTROLS");
+ #endif
    const unsigned int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
- }
+ } // unnamed namespace
  
  namespace
  {
@@@ -146,6 -152,7 +152,7 @@@ void TextField::SetProperty( BaseObject
        case Toolkit::TextField::Property::RENDERING_BACKEND:
        {
          int backend = value.Get< int >();
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p RENDERING_BACKEND %d\n", impl.mController.Get(), backend );
  
          if( impl.mRenderingBackend != backend )
          {
        {
          if( impl.mController )
          {
-           impl.mController->SetText( value.Get< std::string >() );
+           std::string text = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p TEXT %s\n", impl.mController.Get(), text.c_str() );
+           impl.mController->SetText( text );
          }
          break;
        }
        {
          if( impl.mController )
          {
-           impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_INACTIVE, value.Get< std::string >() );
+           std::string text = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT %s\n", impl.mController.Get(), text.c_str() );
+           impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_INACTIVE, text );
          }
          break;
        }
        {
          if( impl.mController )
          {
-           impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_ACTIVE, value.Get< std::string >() );
+           std::string text = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT_FOCUSED %s\n", impl.mController.Get(), text.c_str() );
+           impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_ACTIVE, text );
          }
          break;
        }
          if( impl.mController )
          {
            std::string fontFamily = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_FAMILY %s\n", impl.mController.Get(), fontFamily.c_str() );
  
            if( impl.mController->GetDefaultFontFamily() != fontFamily )
            {
          if( impl.mController )
          {
            std::string fontStyle = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_STYLE %s\n", impl.mController.Get(), fontStyle.c_str() );
  
            if( impl.mController->GetDefaultFontStyle() != fontStyle )
            {
          if( impl.mController )
          {
            float pointSize = value.Get< float >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_STYLE %f\n", impl.mController.Get(), pointSize );
  
            if( !Equals( impl.mController->GetDefaultPointSize(), pointSize ) )
            {
        }
        case Toolkit::TextField::Property::EXCEED_POLICY:
        {
-         impl.mExceedPolicy = value.Get< int >();
+         // TODO
          break;
        }
        case Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT:
        {
-         LayoutEngine& engine = impl.mController->GetLayoutEngine();
-         const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::HorizontalAlignment >( value.Get< std::string >().c_str(),
-                                                                                                                                            HORIZONTAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                                            HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
-         if( engine.GetHorizontalAlignment() != alignment )
+         if( impl.mController )
          {
-           engine.SetHorizontalAlignment( alignment );
-           impl.RequestTextRelayout();
+           std::string alignStr = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p HORIZONTAL_ALIGNMENT %f\n", impl.mController.Get(), alignStr.c_str() );
+           LayoutEngine& engine = impl.mController->GetLayoutEngine();
+           LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< LayoutEngine::HorizontalAlignment >( alignStr.c_str(),
+                                                                                                                         HORIZONTAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                         HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
+           if( engine.GetHorizontalAlignment() != alignment )
+           {
+             engine.SetHorizontalAlignment( alignment );
+             impl.RequestTextRelayout();
+           }
          }
          break;
        }
        case Toolkit::TextField::Property::VERTICAL_ALIGNMENT:
        {
-         LayoutEngine& engine = impl.mController->GetLayoutEngine();
-         const LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::VerticalAlignment >( value.Get< std::string >().c_str(),
-                                                                                                                                        VERTICAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                                        VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
-         if( engine.GetVerticalAlignment() != alignment )
+         if( impl.mController )
          {
-           engine.SetVerticalAlignment( alignment );
-           impl.RequestTextRelayout();
+           std::string alignStr = value.Get< std::string >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p VERTICAL_ALIGNMENT %f\n", impl.mController.Get(), alignStr.c_str() );
+           LayoutEngine& engine = impl.mController->GetLayoutEngine();
+           LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< LayoutEngine::VerticalAlignment >( alignStr.c_str(),
+                                                                                                                     VERTICAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                     VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+           if( engine.GetVerticalAlignment() != alignment )
+           {
+             engine.SetVerticalAlignment( alignment );
+             impl.RequestTextRelayout();
+           }
          }
          break;
        }
          if ( impl.mController )
          {
            Vector4 textColor = value.Get< Vector4 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p TEXT_COLOR %f,%f,%f,%f\n", impl.mController.Get(), textColor.r, textColor.g, textColor.b, textColor.a );
            if ( impl.mController->GetTextColor() != textColor )
            {
              impl.mController->SetTextColor( textColor );
          if ( impl.mController )
          {
            Vector4 textColor = value.Get< Vector4 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT_COLOR %f,%f,%f,%f\n", impl.mController.Get(), textColor.r, textColor.g, textColor.b, textColor.a );
            if ( impl.mController->GetPlaceholderTextColor() != textColor )
            {
              impl.mController->SetPlaceholderTextColor( textColor );
          if( impl.mController )
          {
            Vector2 shadowOffset = value.Get< Vector2 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SHADOW_OFFSET %f,%f\n", impl.mController.Get(), shadowOffset.x, shadowOffset.y );
            if ( impl.mController->GetShadowOffset() != shadowOffset )
            {
              impl.mController->SetShadowOffset( shadowOffset );
          if( impl.mController )
          {
            Vector4 shadowColor = value.Get< Vector4 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SHADOW_COLOR %f,%f,%f,%f\n", impl.mController.Get(), shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a );
            if ( impl.mController->GetShadowColor() != shadowColor )
            {
              impl.mController->SetShadowColor( shadowColor );
        {
          if( impl.mDecorator )
          {
-           impl.mDecorator->SetColor( PRIMARY_CURSOR, value.Get< Vector4 >() );
+           Vector4 color = value.Get< Vector4 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PRIMARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
+           impl.mDecorator->SetColor( PRIMARY_CURSOR, color );
          }
          break;
        }
        {
          if( impl.mDecorator )
          {
-           impl.mDecorator->SetColor( SECONDARY_CURSOR, value.Get< Vector4 >() );
+           Vector4 color = value.Get< Vector4 >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SECONDARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
+           impl.mDecorator->SetColor( SECONDARY_CURSOR, color );
          }
          break;
        }
        {
          if( impl.mController )
          {
-           impl.mController->SetEnableCursorBlink( value.Get< bool >() );
+           bool enable = value.Get< bool >();
+           DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p ENABLE_CURSOR_BLINK %d\n", impl.mController.Get(), enable );
+           impl.mController->SetEnableCursorBlink( enable );
          }
          break;
        }
        {
          if( impl.mDecorator )
          {
-           impl.mDecorator->SetCursorBlinkInterval( value.Get< float >() );
+           float interval = value.Get< float >();
+           DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p CURSOR_BLINK_INTERVAL %f\n", impl.mController.Get(), interval );
+           impl.mDecorator->SetCursorBlinkInterval( interval );
          }
          break;
        }
        {
          if( impl.mDecorator )
          {
-           impl.mDecorator->SetCursorBlinkDuration( value.Get< float >() );
+           float duration = value.Get< float >();
+           DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p CURSOR_BLINK_INTERVAL %f\n", impl.mController.Get(), duration );
+           impl.mDecorator->SetCursorBlinkDuration( duration );
          }
          break;
        }
        case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SCROLL_THRESHOLD:
        {
          float threshold = value.Get< float >();
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SCROLL_THRESHOLD %f\n", impl.mController.Get(), threshold );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SCROLL_SPEED:
        {
          float speed = value.Get< float >();
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SCROLL_SPEED %f\n", impl.mController.Get(), speed );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_IMAGE_LEFT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_IMAGE_RIGHT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_PRESSED_IMAGE_LEFT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
        {
          ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_PRESSED_IMAGE_RIGHT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
  
          if( impl.mDecorator )
          {
        case Toolkit::TextField::Property::SELECTION_HIGHLIGHT_COLOR:
        {
          Vector4 color = value.Get< Vector4 >();
+         DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SELECTION_HIGHLIGHT_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
  
          if( impl.mDecorator )
          {
        {
          if( impl.mDecorator )
          {
-           impl.mDecorator->SetBoundingBox( value.Get< Rect<int> >() );
+           Rect<int> box = value.Get< Rect<int> >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p DECORATION_BOUNDING_BOX %d,%d %dx%d\n", impl.mController.Get(), box.x, box.y, box.width, box.height );
+           impl.mDecorator->SetBoundingBox( box );
          }
          break;
        }
        {
          if( impl.mController )
          {
-           impl.mController->SetMaximumNumberOfCharacters( value.Get< int >() );
+           int max = value.Get< int >();
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p MAX_LENGTH %d\n", impl.mController.Get(), max );
+           impl.mController->SetMaximumNumberOfCharacters( max );
          }
          break;
        }
@@@ -478,6 -547,7 +547,7 @@@ Property::Value TextField::GetProperty
          {
            std::string text;
            impl.mController->GetText( text );
+           DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p returning text: %s\n", impl.mController.Get(), text.c_str() );
            value = text;
          }
          break;
@@@ -788,6 -858,8 +858,8 @@@ void TextField::OnRelayout( const Vecto
    if( mController->Relayout( size ) ||
        !mRenderer )
    {
+     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnRelayout %p Displaying new contents\n", mController.Get() );
      if( mDecorator )
      {
        mDecorator->Relayout( size );
        mRenderer = Backend::Get().NewRenderer( mRenderingBackend );
      }
  
 -    RenderableActor renderableActor;
 +    Actor renderableActor;
      if( mRenderer )
      {
        renderableActor = mRenderer->Render( mController->GetView() );
  
  void TextField::OnKeyInputFocusGained()
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
    VirtualKeyboard::StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );
  
    ImfManager imfManager = ImfManager::Get();
  
  void TextField::OnKeyInputFocusLost()
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField:OnKeyInputFocusLost %p\n", mController.Get() );
    VirtualKeyboard::StatusChangedSignal().Disconnect( this, &TextField::KeyboardStatusChanged );
  
    ImfManager imfManager = ImfManager::Get();
  
  void TextField::OnTap( const TapGesture& gesture )
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnTap %p\n", mController.Get() );
    // Show the keyboard if it was hidden.
    if (!VirtualKeyboard::IsVisible())
    {
@@@ -895,6 -973,8 +973,8 @@@ void TextField::OnPan( const PanGesture
  
  bool TextField::OnKeyEvent( const KeyEvent& event )
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyEvent %p keyCode %d\n", mController.Get(), event.keyCode );
    if( Dali::DALI_KEY_ESCAPE == event.keyCode ||
        "Return" == event.keyPressedName ) // Make a Dali key code for this
    {
  
  ImfManager::ImfCallbackData TextField::OnImfEvent( Dali::ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnImfEvent %p eventName %d\n", mController.Get(), imfEvent.eventName );
    bool update( false );
  
    std::string text;
@@@ -998,6 -1080,8 +1080,8 @@@ void TextField::EnableClipping( bool cl
  
  void TextField::KeyboardStatusChanged(bool keyboardShown)
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::KeyboardStatusChanged %p keyboardShown %d\n", mController.Get(), keyboardShown );
    // Just hide the grab handle when keyboard is hidden.
    if (!keyboardShown )
    {
@@@ -19,7 -19,7 +19,7 @@@
   */
  
  // EXTERNAL INCLUDES
- #include <dali/public-api/adaptor-framework/imf-manager.h>
+ #include <dali/devel-api/adaptor-framework/imf-manager.h>
  
  // INTERNAL INCLUDES
  #include <dali-toolkit/public-api/controls/control-impl.h>
@@@ -199,7 -199,7 +199,7 @@@ private: // Dat
    Text::DecoratorPtr mDecorator;
    Text::ClipperPtr mClipper; ///< For EXCEED_POLICY_CLIP
  
 -  RenderableActor mRenderableActor;
 +  Actor mRenderableActor;
  
    int mRenderingBackend;
    int mExceedPolicy;
@@@ -20,8 -20,8 +20,8 @@@
  
  // EXTERNAL INCLUDES
  #include <dali/public-api/object/type-registry.h>
- #include <dali/public-api/object/type-registry-helper.h>
- #include <dali/public-api/scripting/scripting.h>
+ #include <dali/devel-api/object/type-registry-helper.h>
+ #include <dali/devel-api/scripting/scripting.h>
  #include <dali/integration-api/debug.h>
  
  // INTERNAL INCLUDES
@@@ -426,6 -426,10 +426,10 @@@ void TextLabel::OnInitialize(
    // Use height-for-width negotiation by default
    self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
    self.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
+   // Enable the text ellipsis.
+   LayoutEngine& engine = mController->GetLayoutEngine();
+   engine.SetTextEllipsisEnabled( true );
  }
  
  void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change )
@@@ -453,7 -457,7 +457,7 @@@ void TextLabel::OnRelayout( const Vecto
        mRenderer = Backend::Get().NewRenderer( mRenderingBackend );
      }
  
 -    RenderableActor renderableActor;
 +    Actor renderableActor;
      if( mRenderer )
      {
        renderableActor = mRenderer->Render( mController->GetView() );
  #include "tool-bar-impl.h"
  
  // EXTERNAL INCLUDES
 -#include <dali/public-api/actors/renderable-actor.h>
 +#include <dali/public-api/actors/image-actor.h>
  #include <dali/public-api/animation/constraints.h>
  #include <dali/public-api/object/type-registry.h>
- #include <dali/public-api/object/type-registry-helper.h>
+ #include <dali/devel-api/object/type-registry-helper.h>
  
  // INTERNAL INCLUDES
  #include <dali-toolkit/public-api/controls/alignment/alignment.h>
@@@ -76,7 -76,7 +76,7 @@@ void ToolBar::SetBackground( Actor back
    background.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
    background.SetSize( Vector2( mToolBarSize.width, mToolBarSize.height ) );
  
 -  RenderableActor renderableActor = RenderableActor::DownCast( background );
 +  ImageActor renderableActor = ImageActor::DownCast( background );
    if ( renderableActor )
    {
      renderableActor.SetSortModifier( 1.f );
@@@ -14,6 -14,7 +14,6 @@@ toolkit_src_files = 
     $(toolkit_src_dir)/builder/replacement.cpp \
     $(toolkit_src_dir)/controls/alignment/alignment-impl.cpp \
     $(toolkit_src_dir)/controls/bloom-view/bloom-view-impl.cpp \
 -   $(toolkit_src_dir)/controls/bubble-effect/bubble-emitter-impl.cpp \
     $(toolkit_src_dir)/controls/buttons/button-impl.cpp \
     $(toolkit_src_dir)/controls/buttons/check-box-button-impl.cpp \
     $(toolkit_src_dir)/controls/buttons/push-button-impl.cpp \
     $(toolkit_src_dir)/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp \
     $(toolkit_src_dir)/controls/image-view/masked-image-view-impl.cpp \
     $(toolkit_src_dir)/controls/magnifier/magnifier-impl.cpp \
-    $(toolkit_src_dir)/controls/navigation-frame/navigation-bar.cpp \
-    $(toolkit_src_dir)/controls/navigation-frame/navigation-control-impl.cpp \
-    $(toolkit_src_dir)/controls/navigation-frame/navigation-title-bar.cpp \
-    $(toolkit_src_dir)/controls/navigation-frame/navigation-tool-bar.cpp \
-    $(toolkit_src_dir)/controls/navigation-frame/page-impl.cpp \
     $(toolkit_src_dir)/controls/popup/popup-impl.cpp \
     $(toolkit_src_dir)/controls/popup/popup-style-impl.cpp \
     $(toolkit_src_dir)/controls/page-turn-view/page-turn-portrait-view-impl.cpp \
     $(toolkit_src_dir)/controls/page-turn-view/page-turn-landscape-view-impl.cpp \
     $(toolkit_src_dir)/controls/page-turn-view/page-turn-view-impl.cpp \
     $(toolkit_src_dir)/controls/scroll-bar/scroll-bar-impl.cpp \
-    $(toolkit_src_dir)/controls/scroll-component/scroll-bar-internal-impl.cpp \
-    $(toolkit_src_dir)/controls/scroll-component/scroll-bar-internal.cpp \
+    $(toolkit_src_dir)/controls/scrollable/bouncing-effect-actor.cpp \
+    $(toolkit_src_dir)/controls/scrollable/item-view/depth-layout.cpp \
+    $(toolkit_src_dir)/controls/scrollable/item-view/grid-layout.cpp \
     $(toolkit_src_dir)/controls/scrollable/item-view/item-view-impl.cpp \
+    $(toolkit_src_dir)/controls/scrollable/item-view/spiral-layout.cpp \
     $(toolkit_src_dir)/controls/scrollable/scrollable-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-connector-impl.cpp \
     $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-base-impl.cpp \
     $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp \
     $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-carousel-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-cube-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-helper-functions.cpp \
     $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-page-cube-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect-impl.cpp \
-    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp \
+    $(toolkit_src_dir)/controls/scrollable/scroll-view/scroll-view-page-path-effect-impl.cpp \
     $(toolkit_src_dir)/controls/shadow-view/shadow-view-impl.cpp \
     $(toolkit_src_dir)/controls/slider/slider-impl.cpp \
     $(toolkit_src_dir)/controls/super-blur-view/super-blur-view-impl.cpp \
@@@ -92,6 -82,7 +81,7 @@@
     $(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 \
     $(toolkit_src_dir)/text/rendering/text-backend-impl.cpp \
     $(toolkit_src_dir)/transition-effects/cube-transition-effect-impl.cpp \
@@@ -19,7 -19,7 +19,7 @@@
  #include <dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h>
  
  // EXTERNAL INCLUDES
- #include <dali/public-api/adaptor-framework/singleton-service.h>
+ #include <dali/devel-api/adaptor-framework/singleton-service.h>
  
  // INTERNAL INCLUDES
  #include <dali-toolkit/internal/atlas-manager/atlas-manager-impl.h>
@@@ -78,15 -78,15 +78,15 @@@ void AtlasGlyphManager::Add( const Text
  
  void AtlasGlyphManager::GenerateMeshData( uint32_t imageId,
                                            const Vector2& position,
 -                                          MeshData& meshData )
 +                                          Toolkit::AtlasManager::Mesh2D& mesh )
  {
    GetImplementation(*this).GenerateMeshData( imageId,
                                               position,
 -                                             meshData );
 +                                             mesh );
  }
  
 -void AtlasGlyphManager::StitchMesh( MeshData& first,
 -                                    const MeshData& second )
 +void AtlasGlyphManager::StitchMesh( Toolkit::AtlasManager::Mesh2D& first,
 +                                    const Toolkit::AtlasManager::Mesh2D& second )
  {
    GetImplementation(*this).StitchMesh( first, second );
  }
@@@ -118,22 -118,11 +118,22 @@@ Pixel::Format AtlasGlyphManager::GetPix
    return GetImplementation(*this).GetPixelFormat( atlasId );
  }
  
 +Material AtlasGlyphManager::GetMaterial( uint32_t atlasId ) const
 +{
 +  return GetImplementation(*this).GetMaterial( atlasId );
 +}
 +
 +Sampler AtlasGlyphManager::GetSampler( uint32_t atlasId ) const
 +{
 +  return GetImplementation(*this).GetSampler( atlasId );
 +}
 +
  const Toolkit::AtlasGlyphManager::Metrics& AtlasGlyphManager::GetMetrics()
  {
    return GetImplementation(*this).GetMetrics();
  }
  
 +
  } // namespace Toolkit
  
  } // namespace Dali
  // EXTERNAL INCLUDES
  #include <dali/dali.h>
  #include <dali/integration-api/debug.h>
- //#include <dali/public-api/actors/renderer.h>
- #include <dali/public-api/text-abstraction/text-abstraction.h>
+ #include <dali/devel-api/text-abstraction/font-client.h>
 -#include <dali/devel-api/actors/mesh-actor.h>
 -#include <dali/devel-api/geometry/mesh.h>
  
  // 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>
- #if defined(DEBUG_ENABLED)
- Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_ATLAS_RENDERER");
- #endif
+ #include <dali-toolkit/internal/text/rendering/shaders/text-bgra-shader.h>
 -#include <dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.h>
++//#include <dali-toolkit/internal/text/rendering/shaders/text-basic-shadow-shader.h>
  
  using namespace Dali;
  using namespace Dali::Toolkit;
@@@ -38,68 -40,16 +38,72 @@@ using namespace Dali::Toolkit::Text
  
  namespace
  {
+ #if defined(DEBUG_ENABLED)
+   Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_TEXT_RENDERING");
+ #endif
    const float ZERO( 0.0f );
    const float HALF( 0.5f );
    const float ONE( 1.0f );
    const float TWO( 2.0f );
    const uint32_t DEFAULT_ATLAS_WIDTH = 512u;
    const uint32_t DEFAULT_ATLAS_HEIGHT = 512u;
 +
 +  #define MAKE_SHADER(A)#A
 +
 +  const char* VERTEX_SHADER = MAKE_SHADER(
 +  attribute mediump vec2    aPosition;
 +  attribute mediump vec2    aTexCoord;
 +  uniform   mediump mat4    uMvpMatrix;
 +  uniform   mediump vec3    uSize;
 +  varying   mediump vec2    vTexCoord;
 +
 +  void main()
 +  {
 +    mediump vec4 position = vec4( aPosition, 0.0, 1.0 );
 +    position.xyz *= uSize;
 +    gl_Position = uMvpMatrix * position;
 +    vTexCoord = aTexCoord;
 +  }
 +  );
 +
 +  const char* FRAGMENT_SHADER = MAKE_SHADER(
 +  uniform         sampler2D sTexture;
 +  varying mediump vec2      vTexCoord;
 +
 +  void main()
 +  {
 +    //gl_FragColor = vec4( 1.0 );
 +    gl_FragColor = texture2D( sTexture, vTexCoord );
 +  }
 +  );
 +
 +  const char* VERTEX_SHADER_SHADOW = MAKE_SHADER(
 +  attribute mediump vec2    aPosition;
 +  attribute mediump vec2    aTexCoord;
 +  uniform   mediump vec3    uSize;
 +  varying   mediump vec2    vTexCoord;
 +
 +  void main()
 +  {
 +    mediump vec4 position = vec4( aPosition, 0.0, 1.0 );
 +    position.xyz *= uSize;
 +    gl_Position = position;
 +    vTexCoord = aTexCoord;
 +  }
 +  );
 +
 +  const char* FRAGMENT_SHADER_SHADOW = MAKE_SHADER(
 +  uniform         sampler2D sTexture;
 +  uniform lowp    vec4      uColor;
 +  varying mediump vec2      vTexCoord;
 +
 +  void main()
 +  {
 +    mediump vec4 color = texture2D( sTexture, vTexCoord );
 +    gl_FragColor = vec4(uColor.rgb, uColor.a*color.r);
 +  }
 +  );
  }
  
  struct AtlasRenderer::Impl : public ConnectionTracker
    {
      Vector4 mColor;
      uint32_t mAtlasId;
 -    MeshData mMeshData;
 +    AtlasManager::Mesh2D mMesh;
      FrameBufferImage mBuffer;
      bool mIsUnderline;
    };
    {
      mGlyphManager = AtlasGlyphManager::Get();
      mFontClient = TextAbstraction::FontClient::Get();
 -    mBasicShader = BasicShader::New();
 -    mBgraShader = BgraShader::New();
 -    mBasicShadowShader = BasicShadowShader::New();
  
 -    mFace.reserve( 6u );
 -    mFace.push_back( 0 ); mFace.push_back( 2u ); mFace.push_back( 1u );
 -    mFace.push_back( 1u ); mFace.push_back( 2u ); mFace.push_back( 3u );
 +    mQuadVertexFormat[ "aPosition" ] = Property::VECTOR2;
 +    mQuadVertexFormat[ "aTexCoord" ] = Property::VECTOR2;
 +    mQuadIndexFormat[ "indices" ] = Property::UNSIGNED_INTEGER;
 +
 +    mShader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
 +    mShadowShader = Shader::New( VERTEX_SHADER_SHADOW, FRAGMENT_SHADER_SHADOW );
    }
  
    void AddGlyphs( const std::vector<Vector2>& positions,
  
      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;
 +        AtlasManager::Mesh2D newMesh;
          mGlyphManager.Cached( glyph.fontId, glyph.index, slot );
  
          if ( slot.mImageId )
          {
            // This glyph already exists so generate mesh data plugging in our supplied position
 -          mGlyphManager.GenerateMeshData( slot.mImageId, position, newMeshData );
 +          mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh );
            mImageIds.PushBack( slot.mImageId );
          }
          else
  
            // Create a new image for the glyph
            BufferImage bitmap = mFontClient.CreateBitmap( glyph.fontId, glyph.index );
-           // Ensure that the next image will fit into the current block size
-           bool setSize = false;
-           if ( bitmap.GetWidth() > mBlockSizes[ currentBlockSize ].mNeededBlockWidth )
+           if ( bitmap )
            {
-             setSize = true;
-             mBlockSizes[ currentBlockSize ].mNeededBlockWidth = bitmap.GetWidth();
-           }
-           if ( bitmap.GetHeight() > mBlockSizes[ currentBlockSize ].mNeededBlockHeight )
-           {
-             setSize = true;
-             mBlockSizes[ currentBlockSize ].mNeededBlockHeight = bitmap.GetHeight();
-           }
+             // Ensure that the next image will fit into the current block size
+             bool setSize = false;
+             if ( bitmap.GetWidth() > mBlockSizes[ currentBlockSize ].mNeededBlockWidth )
+             {
+               setSize = true;
+               mBlockSizes[ currentBlockSize ].mNeededBlockWidth = bitmap.GetWidth();
+             }
+             if ( bitmap.GetHeight() > mBlockSizes[ currentBlockSize ].mNeededBlockHeight )
+             {
+               setSize = true;
+               mBlockSizes[ currentBlockSize ].mNeededBlockHeight = bitmap.GetHeight();
+             }
  
-           if ( setSize )
-           {
-             mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH,
-                                            DEFAULT_ATLAS_HEIGHT,
-                                            mBlockSizes[ currentBlockSize ].mNeededBlockWidth,
-                                            mBlockSizes[ currentBlockSize ].mNeededBlockHeight );
-           }
+             if ( setSize )
+             {
+               mGlyphManager.SetNewAtlasSize( DEFAULT_ATLAS_WIDTH,
+                                              DEFAULT_ATLAS_HEIGHT,
+                                              mBlockSizes[ currentBlockSize ].mNeededBlockWidth,
+                                              mBlockSizes[ currentBlockSize ].mNeededBlockHeight );
+             }
  
-           // Locate a new slot for our glyph
-           mGlyphManager.Add( glyph, bitmap, slot );
+             // Locate a new slot for our glyph
+             mGlyphManager.Add( glyph, bitmap, slot );
  
-           // Generate mesh data for this quad, plugging in our supplied position
-           if ( slot.mImageId )
-           {
-             mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh );
-             mImageIds.PushBack( slot.mImageId );
+             // Generate mesh data for this quad, plugging in our supplied position
+             if ( slot.mImageId )
+             {
 -              mGlyphManager.GenerateMeshData( slot.mImageId, position, newMeshData );
++              mGlyphManager.GenerateMeshData( slot.mImageId, position, newMesh );
+               mImageIds.PushBack( slot.mImageId );
+             }
            }
          }
          // Find an existing mesh data object to attach to ( or create a new one, if we can't find one using the same atlas)
          StitchTextMesh( meshContainer,
 -                        newMeshData,
 +                        newMesh,
                          extents,
                          textColor,
                          position.y + glyph.yBearing,
                          currentUnderlinePosition,
                          currentUnderlineThickness,
                          slot );
 -        lastFontId = glyph.fontId;
 +       lastFontId = glyph.fontId;
        }
      }
  
      {
        for ( std::vector< MeshRecord >::iterator mIt = meshContainer.begin(); mIt != meshContainer.end(); ++mIt )
        {
 -        MeshActor actor = MeshActor::New( Mesh::New( mIt->mMeshData ) );
 -        actor.SetColor( mIt->mColor );
 -
 -        // Ensure that text rendering is unfiltered
 -        actor.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
 -        if ( mIt->mIsUnderline )
 -        {
 -          actor.SetColorMode( USE_OWN_COLOR );
 -        }
 -        else
 -        {
 -          actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
 -        }
 +        Actor actor = CreateMeshActor( *mIt );
  
 -        // Check to see what pixel format the shader should be
 -        if ( mGlyphManager.GetPixelFormat( mIt->mAtlasId ) == Pixel::L8 )
 -        {
 -          // Create an effect if necessary
 -          if ( style == STYLE_DROP_SHADOW )
 -          {
 -            actor.Add( GenerateShadow( *mIt, shadowOffset, shadowColor ) );
 -          }
 -          actor.SetShaderEffect( mBasicShader );
 -        }
 -        else
 +        // Create an effect if necessary
 +        if ( style == STYLE_DROP_SHADOW )
          {
 -          actor.SetShaderEffect( mBgraShader );
 +          actor.Add( GenerateShadow( *mIt, shadowOffset, shadowColor ) );
          }
  
          if ( mActor )
      }
  #if defined(DEBUG_ENABLED)
      Toolkit::AtlasGlyphManager::Metrics metrics = mGlyphManager.GetMetrics();
-     DALI_LOG_INFO( gLogFilter, Debug::Concise, "TextAtlasRenderer::GlyphManager::GlyphCount: %i, AtlasCount: %i, TextureMemoryUse: %iK\n",
+     DALI_LOG_INFO( gLogFilter, Debug::General, "TextAtlasRenderer::GlyphManager::GlyphCount: %i, AtlasCount: %i, TextureMemoryUse: %iK\n",
                                                  metrics.mGlyphCount,
                                                  metrics.mAtlasMetrics.mAtlasCount,
                                                  metrics.mAtlasMetrics.mTextureMemoryUsed / 1024 );
  #endif
    }
  
 +  Actor CreateMeshActor( const MeshRecord& meshRecord )
 +  {
 +    PropertyBuffer quadVertices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadVertexFormat, meshRecord.mMesh.mVertices.Size() );
 +    PropertyBuffer quadIndices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadIndexFormat, meshRecord.mMesh.mIndices.Size() );
 +    quadVertices.SetData( const_cast< AtlasManager::Vertex2D* >( &meshRecord.mMesh.mVertices[ 0 ] ) );
 +    quadIndices.SetData( const_cast< unsigned int* >( &meshRecord.mMesh.mIndices[ 0 ] ) );
 +
 +    Geometry quadGeometry = Geometry::New();
 +    quadGeometry.AddVertexBuffer( quadVertices );
 +    quadGeometry.SetIndexBuffer( quadIndices );
 +
 +    Material material = mGlyphManager.GetMaterial( meshRecord.mAtlasId );
 +    Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
 +    renderer.SetDepthIndex( 0 );
 +    Actor actor = Actor::New();
 +    actor.AddRenderer( renderer );
 +    actor.SetSize( 1.0f, 1.0f );
 +    actor.SetColor( meshRecord.mColor );
 +
 +    if ( meshRecord.mIsUnderline )
 +    {
 +      actor.SetColorMode( USE_OWN_COLOR );
 +    }
 +    else
 +    {
 +      actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
 +    }
 +    return actor;
 +  }
 +
    void StitchTextMesh( std::vector< MeshRecord >& meshContainer,
 -                       MeshData& newMeshData,
 +                       AtlasManager::Mesh2D& newMesh,
                         Vector< Extent >& extents,
                         const Vector4& color,
                         float baseLine,
    {
      if ( slot.mImageId )
      {
 -      MeshData::VertexContainer verts = newMeshData.GetVertices();
 -      float left = verts[ 0 ].x;
 -      float right = verts[ 1 ].x;
 +      float left = newMesh.mVertices[ 0 ].mPosition.x;
 +      float right = newMesh.mVertices[ 1 ].mPosition.x;
  
        // Check to see if there's a mesh data object that references the same atlas ?
        uint32_t index = 0;
          if ( slot.mAtlasId == mIt->mAtlasId && color == mIt->mColor )
          {
            // Stitch the mesh to the existing mesh and adjust any extents
 -          mGlyphManager.StitchMesh( mIt->mMeshData, newMeshData );
 +          mGlyphManager.StitchMesh( mIt->mMesh, newMesh );
            AdjustExtents( extents,
                           meshContainer,
                           index,
        // No mesh data object currently exists that references this atlas, so create a new one
        MeshRecord meshRecord;
        meshRecord.mAtlasId = slot.mAtlasId;
 -      meshRecord.mMeshData = newMeshData;
 +      meshRecord.mMesh = newMesh;
        meshRecord.mColor = color;
        meshRecord.mIsUnderline = false;
        meshContainer.push_back( meshRecord );
                             const Vector4& underlineColor,
                             const Vector4& textColor )
    {
 -    MeshData newMeshData;
 +    AtlasManager::Mesh2D newMesh;
 +    unsigned short faceIndex = 0;
      for ( Vector< Extent >::ConstIterator eIt = extents.Begin(); eIt != extents.End(); ++eIt )
      {
 -      MeshData::VertexContainer newVerts;
 -      newVerts.reserve( 4u );
 +      AtlasManager::Vertex2D vert;
        uint32_t index = eIt->mMeshRecordIndex;
        Vector2 uv = mGlyphManager.GetAtlasSize( meshRecords[ index ].mAtlasId );
  
        float tlx = eIt->mLeft;
        float brx = eIt->mRight;
  
 -      newVerts.push_back( MeshData::Vertex( Vector3( tlx, baseLine, ZERO ),
 -                                            Vector2::ZERO,
 -                                            Vector3::ZERO ) );
 -
 -      newVerts.push_back( MeshData::Vertex( Vector3( brx, baseLine, ZERO ),
 -                                            Vector2( u, ZERO ),
 -                                            Vector3::ZERO ) );
 -
 -      newVerts.push_back( MeshData::Vertex( Vector3( tlx, baseLine + thickness, ZERO ),
 -                                            Vector2( ZERO, v ),
 -                                            Vector3::ZERO ) );
 -
 -      newVerts.push_back( MeshData::Vertex( Vector3( brx, baseLine + thickness, ZERO ),
 -                                            Vector2( u, v ),
 -                                            Vector3::ZERO ) );
 -
 -      newMeshData.SetVertices( newVerts );
 -      newMeshData.SetFaceIndices( mFace );
 +      vert.mPosition.x = tlx;
 +      vert.mPosition.y = baseLine;
 +      vert.mTexCoords.x = ZERO;
 +      vert.mTexCoords.y = ZERO;
 +      newMesh.mVertices.PushBack( vert );
 +
 +      vert.mPosition.x = brx;
 +      vert.mPosition.y = baseLine;
 +      vert.mTexCoords.x = u;
 +      newMesh.mVertices.PushBack( vert );
 +
 +      vert.mPosition.x = tlx;
 +      vert.mPosition.y = baseLine + thickness;
 +      vert.mTexCoords.x = ZERO;
 +      vert.mTexCoords.y = v;
 +      newMesh.mVertices.PushBack( vert );
 +
 +      vert.mPosition.x = brx;
 +      vert.mPosition.y = baseLine + thickness;
 +      vert.mTexCoords.x = u;
 +      newMesh.mVertices.PushBack( vert );
 +
 +      // Six indices in counter clockwise winding
 +      newMesh.mIndices.PushBack( faceIndex + 1u );
 +      newMesh.mIndices.PushBack( faceIndex );
 +      newMesh.mIndices.PushBack( faceIndex + 2u );
 +      newMesh.mIndices.PushBack( faceIndex + 2u );
 +      newMesh.mIndices.PushBack( faceIndex + 3u );
 +      newMesh.mIndices.PushBack( faceIndex + 1u );
 +      faceIndex += 4;
  
        if ( underlineColor == textColor )
        {
 -        mGlyphManager.StitchMesh( meshRecords[ index ].mMeshData, newMeshData );
 +        mGlyphManager.StitchMesh( meshRecords[ index ].mMesh, newMesh );
        }
        else
        {
          MeshRecord record;
 -        newMeshData.SetMaterial( meshRecords[ index ].mMeshData.GetMaterial() );
 -        newMeshData.SetHasNormals( true );
 -        newMeshData.SetHasColor( false );
 -        newMeshData.SetHasTextureCoords( true );
 -        record.mMeshData = newMeshData;
 +        record.mMesh = newMesh;
          record.mAtlasId = meshRecords[ index ].mAtlasId;
          record.mColor = underlineColor;
          record.mIsUnderline = true;
      }
    }
  
 -  MeshActor GenerateShadow( MeshRecord& meshRecord,
 -                            const Vector2& shadowOffset,
 -                            const Vector4& shadowColor )
 +  Actor GenerateShadow( MeshRecord& meshRecord,
 +                        const Vector2& shadowOffset,
 +                        const Vector4& shadowColor )
    {
      // Scan vertex buffer to determine width and height of effect buffer needed
 -    MeshData::VertexContainer verts = meshRecord.mMeshData.GetVertices();
 -    float tlx = verts[ 0 ].x;
 -    float tly = verts[ 0 ].y;
 +    const Vector< AtlasManager::Vertex2D >& verts = meshRecord.mMesh.mVertices;
 +    float tlx = verts[ 0 ].mPosition.x;
 +    float tly = verts[ 0 ].mPosition.y;
      float brx = ZERO;
      float bry = ZERO;
  
 -    for ( uint32_t i = 0; i < verts.size(); ++i )
 +    for ( uint32_t i = 0; i < verts.Size(); ++i )
      {
 -      if ( verts[ i ].x < tlx )
 +      if ( verts[ i ].mPosition.x < tlx )
        {
 -        tlx = verts[ i ].x;
 +        tlx = verts[ i ].mPosition.x;
        }
 -      if ( verts[ i ].y < tly )
 +      if ( verts[ i ].mPosition.y < tly )
        {
 -        tly = verts[ i ].y;
 +        tly = verts[ i ].mPosition.y;
        }
 -      if ( verts[ i ].x > brx )
 +      if ( verts[ i ].mPosition.x > brx )
        {
 -        brx = verts[ i ].x;
 +        brx = verts[ i ].mPosition.x;
        }
 -      if ( verts[ i ].y > bry )
 +      if ( verts[ i ].mPosition.y > bry )
        {
 -        bry = verts[ i ].y;
 +        bry = verts[ i ].mPosition.y;
        }
      }
  
      // Create a buffer to render to
      meshRecord.mBuffer = FrameBufferImage::New( width, height );
  
 -    // Create a mesh actor to contain the post-effect render
 -    MeshData::VertexContainer vertices;
 -    MeshData::FaceIndices face;
 -
 -    vertices.push_back( MeshData::Vertex( Vector3( tlx + shadowOffset.x, tly + shadowOffset.y, ZERO ),
 -                                          Vector2::ZERO,
 -                                          Vector3::ZERO ) );
 -
 -    vertices.push_back( MeshData::Vertex( Vector3( brx + shadowOffset.x, tly + shadowOffset.y, ZERO ),
 -                                          Vector2( ONE, ZERO ),
 -                                          Vector3::ZERO ) );
 -
 -    vertices.push_back( MeshData::Vertex( Vector3( tlx + shadowOffset.x, bry + shadowOffset.y, ZERO ),
 -                                          Vector2( ZERO, ONE ),
 -                                          Vector3::ZERO ) );
 -
 -    vertices.push_back( MeshData::Vertex( Vector3( brx + shadowOffset.x, bry + shadowOffset.y, ZERO ),
 -                                          Vector2::ONE,
 -                                          Vector3::ZERO ) );
 -
 -    MeshData meshData;
 -    Material newMaterial = Material::New("effect buffer");
 -    newMaterial.SetDiffuseTexture( meshRecord.mBuffer );
 -    meshData.SetMaterial( newMaterial );
 -    meshData.SetVertices( vertices );
 -    meshData.SetFaceIndices( mFace );
 -    meshData.SetHasNormals( true );
 -    meshData.SetHasColor( false );
 -    meshData.SetHasTextureCoords( true );
 -    MeshActor actor = MeshActor::New( Mesh::New( meshData ) );
 -    actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
 -    actor.SetShaderEffect( mBgraShader );
 -    actor.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
 -    actor.SetSortModifier( 0.1f ); // force behind main text
 -
 -    // Create a sub actor to render once with normalized vertex positions
 -    MeshData newMeshData;
 -    MeshData::VertexContainer newVerts;
 -    MeshData::FaceIndices newFaces;
 -    MeshData::FaceIndices faces = meshRecord.mMeshData.GetFaces();
 -    for ( uint32_t i = 0; i < verts.size(); ++i )
 +    // We will render a quad into this buffer
 +    unsigned int indices[ 6 ] = { 1, 0, 2, 2, 3, 1 };
 +    PropertyBuffer quadVertices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadVertexFormat, 4u );
 +    PropertyBuffer quadIndices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadIndexFormat, sizeof(indices)/sizeof(indices[0]) );
 +
 +    AtlasManager::Vertex2D vertices[ 4 ] = {
 +    { Vector2( tlx + shadowOffset.x, tly + shadowOffset.y ), Vector2( ZERO, ZERO ) },
 +    { Vector2( brx + shadowOffset.x, tly + shadowOffset.y ), Vector2( ONE, ZERO ) },
 +    { Vector2( tlx + shadowOffset.x, bry + shadowOffset.y ), Vector2( ZERO, ONE ) },
 +    { Vector2( brx + shadowOffset.x, bry + shadowOffset.y ), Vector2( ONE, ONE ) } };
 +
 +    quadVertices.SetData( vertices );
 +    quadIndices.SetData( indices );
 +
 +    Geometry quadGeometry = Geometry::New();
 +    quadGeometry.AddVertexBuffer( quadVertices );
 +    quadGeometry.SetIndexBuffer( quadIndices );
 +
 +    Sampler sampler = Sampler::New( meshRecord.mBuffer, "sTexture" );
 +    Material material = Material::New( mShader );
 +    material.AddSampler( sampler );
 +
 +    Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
 +    renderer.SetDepthIndex( 1.0f );
 +    Actor actor = Actor::New();
 +    actor.AddRenderer( renderer );
 +    actor.SetSize( 1.0f, 1.0f );
 +
 +    // Create a sub actor to render the source with normalized vertex positions
 +    Vector< AtlasManager::Vertex2D > normVertexList;
 +    for ( uint32_t i = 0; i < verts.Size(); ++i )
      {
 -      MeshData::Vertex vertex = verts[ i ];
 -      vertex.x = ( ( vertex.x - tlx ) * divWidth ) - ONE;
 -      vertex.y = ( ( vertex.y - tly ) * divHeight ) - ONE;
 -      newVerts.push_back( vertex );
 +      AtlasManager::Vertex2D vertex = verts[ i ];
 +      vertex.mPosition.x = ( ( vertex.mPosition.x - tlx ) * divWidth ) - ONE;
 +      vertex.mPosition.y = ( ( vertex.mPosition.y - tly ) * divHeight ) - ONE;
 +      normVertexList.PushBack( vertex );
      }
  
 -    // Reverse triangle winding order
 -    uint32_t faceCount = faces.size() / 3;
 -    for ( uint32_t i = 0; i < faceCount; ++i )
 -    {
 -      uint32_t index = i * 3;
 -      newFaces.push_back( faces[ index + 2 ] );
 -      newFaces.push_back( faces[ index + 1 ] );
 -      newFaces.push_back( faces[ index ] );
 -    }
 -
 -    newMeshData.SetMaterial( meshRecord.mMeshData.GetMaterial() );
 -    newMeshData.SetVertices( newVerts );
 -    newMeshData.SetFaceIndices( newFaces );
 -    newMeshData.SetHasNormals( true );
 -    newMeshData.SetHasColor( false );
 -    newMeshData.SetHasTextureCoords( true );
 -
 -    MeshActor subActor = MeshActor::New( Mesh::New( newMeshData ) );
 +    PropertyBuffer normVertices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadVertexFormat, normVertexList.Size() );
 +    PropertyBuffer normIndices = PropertyBuffer::New( PropertyBuffer::STATIC, mQuadIndexFormat, meshRecord.mMesh.mIndices.Size() );
 +    normVertices.SetData( const_cast< AtlasManager::Vertex2D* >( &normVertexList[ 0 ] ) );
 +    normIndices.SetData( const_cast< unsigned int* >( &meshRecord.mMesh.mIndices[ 0 ] ) );
 +
 +    Geometry normGeometry = Geometry::New();
 +    normGeometry.AddVertexBuffer( normVertices );
 +    normGeometry.SetIndexBuffer( normIndices );
 +
 +    Material normMaterial = Material::New( mShadowShader );
 +    Sampler normSampler =  mGlyphManager.GetSampler( meshRecord.mAtlasId );
 +    normMaterial.AddSampler( normSampler );
 +    Dali::Renderer normRenderer = Dali::Renderer::New( normGeometry, normMaterial );
 +    Actor subActor = Actor::New();
 +    subActor.AddRenderer( normRenderer );
 +    subActor.SetSize( 1.0f, 1.0f );
      subActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
      subActor.SetColor( shadowColor );
 -    subActor.SetShaderEffect( mBasicShadowShader );
 -    subActor.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
  
      // Create a render task to render the effect
      RenderTask task = Stage::GetCurrent().GetRenderTaskList().CreateTask();
      task.SetRefreshRate( RenderTask::REFRESH_ONCE );
      task.FinishedSignal().Connect( this, &AtlasRenderer::Impl::RenderComplete );
      actor.Add( subActor );
 +
      return actor;
    }
  
      }
    }
  
 -  RenderableActor mActor;                             ///< The actor parent which renders the text
 +  Actor mActor;                                       ///< The actor parent which renders the text
    AtlasGlyphManager mGlyphManager;                    ///< Glyph Manager to handle upload and caching
    Vector< uint32_t > mImageIds;                       ///< A list of imageIDs used by the renderer
    TextAbstraction::FontClient mFontClient;            ///> The font client used to supply glyph information
 -  ShaderEffect mBasicShader;                          ///> Shader used to render L8 glyphs
 -  ShaderEffect mBgraShader;                           ///> Shader used to render BGRA glyphs
 -  ShaderEffect mBasicShadowShader;                    ///> Shader used to render drop shadow into buffer
 +  Shader mShader;                                     ///> Shader used to render drop shadow buffer textures
 +  Shader mShadowShader;                               ///> Shader used to render drop shadow into buffer
    std::vector< MaxBlockSize > mBlockSizes;            ///> Maximum size needed to contain a glyph in a block within a new atlas
 -  std::vector< MeshData::FaceIndex > mFace;           ///> Face indices for a quad
 +  std::vector< uint32_t > mFace;                      ///> Face indices for a quad
 +  Property::Map mQuadVertexFormat;
 +  Property::Map mQuadIndexFormat;
  };
  
  Text::RendererPtr AtlasRenderer::New()
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Text::AtlasRenderer::New()\n" );
    return Text::RendererPtr( new AtlasRenderer() );
  }
  
 -RenderableActor AtlasRenderer::Render( Text::ViewInterface& view )
 +Actor 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;
  }
  
  // CLASS HEADER
  #include <dali-toolkit/internal/text/rendering/basic/text-basic-renderer.h>
  
- // INTERNAL INCLUDES
- #include <dali/public-api/text-abstraction/font-client.h>
+ // EXTERNAL INCLUDES
+ #include <dali/devel-api/text-abstraction/font-client.h>
  #include <dali/public-api/actors/image-actor.h>
- #include <dali/public-api/images/atlas.h>
 -#include <dali/devel-api/actors/mesh-actor.h>
+ #include <dali/devel-api/images/atlas.h>
 -#include <dali/devel-api/geometry/mesh.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>
  
@@@ -33,6 -39,10 +37,10 @@@ 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
@@@ -264,7 -274,6 +272,7 @@@ struct BasicRenderer::Imp
     * @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
      Dali::Mesh mesh = Mesh::New( meshData );
      return mesh;
    }
 -
 -  RenderableActor mActor; ///< The actor which renders the text
 +  */
 +  Actor mActor; ///< The actor which renders the text
  
    Atlas mAtlasL8;
    unsigned int mWidthL8;
  
  Text::RendererPtr BasicRenderer::New()
  {
+   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Text::BasicRenderer::New()\n" );
    return Text::RendererPtr( new BasicRenderer() );
  }
  
 -RenderableActor BasicRenderer::Render( Text::ViewInterface& view )
 +Actor BasicRenderer::Render( Text::ViewInterface& view )
  {
    // Remove the previous text
    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->CreateAtlases( glyphs );
  
 -    MeshActor actorL8;
 +    Actor actorL8;
      if( mImpl->mAtlasL8 )
      {
 -      actorL8 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::L8, 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 );
 +      //actorL8.SetShaderEffect( shader );
      }
  
 -    MeshActor actorBGRA8888;
 +    Actor actorBGRA8888;
      if( mImpl->mAtlasBGRA8888 )
      {
 -      actorBGRA8888 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::BGRA8888, 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 );
 +      //actorBGRA8888.SetShaderEffect( shader );
      }
  
      // If we have both monochrome & color glyphs, two mesh actors are returned in a container
index 0000000,f7789f1..89e7a8b
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,63 +1,63 @@@
 -
+ /*
+  * 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/text-renderer.h>
+ namespace Dali
+ {
+ namespace Toolkit
+ {
+ namespace Text
+ {
+ namespace BasicShadowShader
+ {
 -
++/*
+ Dali::ShaderEffect New()
+ {
+   std::string vertexShader = DALI_COMPOSE_SHADER(
+       void main()\n
+       {\n
+         gl_Position = vec4( aPosition.xy, 0.0, 1.0 );\n
+         vTexCoord = aTexCoord.xy;\n
+       }\n
+   );
+   std::string fragmentShader = DALI_COMPOSE_SHADER(
+       void main()\n
+       {\n
+         mediump vec4 color = texture2D( sTexture, vTexCoord );
+         gl_FragColor = vec4(uColor.rgb, uColor.a*color.r);
+       }\n
+   );
+   Dali::ShaderEffect shaderEffect = Dali::ShaderEffect::New( vertexShader, fragmentShader,
+                                                              Dali::GeometryType( Dali::GEOMETRY_TYPE_TEXTURED_MESH ),
+                                                              Dali::ShaderEffect::GeometryHints( Dali::ShaderEffect::HINT_NONE ) );
+   return shaderEffect;
+ }
++*/
+ } // namespace BasicShadowShader
+ } // namespace Text
+ } // namespace Toolkit
+ } // namespace Dali
  #include <limits>
  #include <stack>
  #include <dali/public-api/actors/image-actor.h>
 -#include <dali/devel-api/actors/mesh-actor.h>
  #include <dali/public-api/animation/constraint.h>
  #include <dali/public-api/animation/constraints.h>
 -#include <dali/devel-api/geometry/mesh.h>
  #include <dali/public-api/object/type-registry.h>
- #include <dali/public-api/object/type-registry-helper.h>
- #include <dali/public-api/scripting/scripting.h>
+ #include <dali/devel-api/object/type-registry-helper.h>
+ #include <dali/devel-api/scripting/scripting.h>
  #include <dali/public-api/size-negotiation/relayout-container.h>
  #include <dali/integration-api/debug.h>
  
@@@ -47,9 -49,9 +47,9 @@@ namespace Toolki
  namespace
  {
  
 -#if defined(DEBUG_ENABLED)
 -Integration::Log::Filter* gLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_CONTROL");
 -#endif
 +//#if defined(DEBUG_ENABLED)
 +//Integration::Log::Filter* gLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_CONTROL");
 +//#endif
  
  const float MAX_FLOAT_VALUE( std::numeric_limits<float>::max() );
  const Vector3 MAX_SIZE( MAX_FLOAT_VALUE, MAX_FLOAT_VALUE, MAX_FLOAT_VALUE );
@@@ -98,10 -100,10 +98,10 @@@ struct Backgroun
  /**
   * Creates a white coloured Mesh.
   */
 -Mesh CreateMesh()
 +Vector3 CreateMesh()
  {
    Vector3 white( Color::WHITE );
 -
 +  /*
    MeshData meshData;
  
    // Create vertices with a white color (actual color is set by actor color)
    meshData.SetVertices( vertices );
    meshData.SetFaceIndices( faces );
    meshData.SetHasColor( true );
 -
 -  return Mesh::New( meshData );
 +  */
 +  return white;
 +  //return Mesh::New( meshData );
  }
  
  /**
@@@ -552,7 -553,6 +552,7 @@@ void Control::SetBackgroundColor( cons
      // Just set the actor color
      background.actor.SetColor( color );
    }
 +  /*
    else
    {
      // Create Mesh Actor
      background.actor = meshActor;
      Self().Add( meshActor );
    }
 +  */
  
    background.color = color;
  }
@@@ -589,14 -588,12 +589,14 @@@ void Control::SetBackgroundImage( Imag
      background.actor.Reset();
    }
  
 +  /*
    ImageActor imageActor = ImageActor::New( image );
 -  SetupBackgroundActor( imageActor, background.color );
 +  SetupBackgroundActor( imageActor, Actor::Property::SIZE, background.color );
  
    // Set the background actor before adding so that we do not inform derived classes
    background.actor = imageActor;
    Self().Add( imageActor );
 +  */
  }
  
  void Control::ClearBackground()
@@@ -7,6 -7,7 +7,6 @@@ public_api_src_files = 
    $(public_api_src_dir)/controls/control-impl.cpp \
    $(public_api_src_dir)/controls/control.cpp \
    $(public_api_src_dir)/controls/alignment/alignment.cpp \
 -  $(public_api_src_dir)/controls/bubble-effect/bubble-emitter.cpp \
    $(public_api_src_dir)/controls/buttons/button.cpp \
    $(public_api_src_dir)/controls/buttons/check-box-button.cpp \
    $(public_api_src_dir)/controls/buttons/push-button.cpp \
@@@ -14,8 -15,6 +14,6 @@@
    $(public_api_src_dir)/controls/default-controls/check-button-factory.cpp \
    $(public_api_src_dir)/controls/default-controls/push-button-factory.cpp \
    $(public_api_src_dir)/controls/default-controls/solid-color-actor.cpp \
-   $(public_api_src_dir)/controls/navigation-frame/navigation-control.cpp \
-   $(public_api_src_dir)/controls/navigation-frame/page.cpp \
    $(public_api_src_dir)/controls/magnifier/magnifier.cpp \
    $(public_api_src_dir)/controls/page-turn-view/page-factory.cpp \
    $(public_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \
    $(public_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
    $(public_api_src_dir)/controls/popup/popup.cpp \
    $(public_api_src_dir)/controls/scroll-bar/scroll-bar.cpp \
-   $(public_api_src_dir)/controls/scrollable/item-view/depth-layout.cpp \
-   $(public_api_src_dir)/controls/scrollable/item-view/grid-layout.cpp \
+   $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.cpp \
    $(public_api_src_dir)/controls/scrollable/item-view/item-factory.cpp \
    $(public_api_src_dir)/controls/scrollable/item-view/item-layout.cpp \
    $(public_api_src_dir)/controls/scrollable/item-view/item-view.cpp \
-   $(public_api_src_dir)/controls/scrollable/item-view/spiral-layout.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-carousel-effect.cpp \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-constraints.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-cube-effect.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-depth-effect.cpp \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-cube-effect.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect.cpp \
+   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-path-effect.cpp \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-connector.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-component-impl.cpp \
-   $(public_api_src_dir)/controls/scrollable/scroll-component.cpp \
    $(public_api_src_dir)/controls/scrollable/scrollable.cpp \
    $(public_api_src_dir)/controls/shadow-view/shadow-view.cpp \
    $(public_api_src_dir)/controls/slider/slider.cpp \
@@@ -142,13 -130,11 +129,11 @@@ public_api_image_view_header_files = 
    $(public_api_src_dir)/controls/image-view/masked-image-view.h
  
  public_api_item_view_header_files = \
-   $(public_api_src_dir)/controls/scrollable/item-view/depth-layout.h \
-   $(public_api_src_dir)/controls/scrollable/item-view/grid-layout.h \
+   $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \
    $(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \
    $(public_api_src_dir)/controls/scrollable/item-view/item-layout.h \
    $(public_api_src_dir)/controls/scrollable/item-view/item-view-declarations.h \
-   $(public_api_src_dir)/controls/scrollable/item-view/item-view.h \
-   $(public_api_src_dir)/controls/scrollable/item-view/spiral-layout.h
+   $(public_api_src_dir)/controls/scrollable/item-view/item-view.h
  
  public_api_magnifier_header_files = \
    $(public_api_src_dir)/controls/magnifier/magnifier.h
@@@ -163,24 -149,15 +148,15 @@@ public_api_popup_header_files = 
    $(public_api_src_dir)/controls/popup/popup.h
  
  public_api_scrollable_header_files = \
-   $(public_api_src_dir)/controls/scrollable/scroll-component-impl.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-component.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-connector.h \
    $(public_api_src_dir)/controls/scrollable/scrollable.h
  
  public_api_scroll_bar_header_files = \
    $(public_api_src_dir)/controls/scroll-bar/scroll-bar.h
  
  public_api_scroll_view_header_files = \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-carousel-effect.h \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-constraints.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-cube-effect.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-depth-effect.h \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-cube-effect.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h \
-   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect.h \
+   $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-page-path-effect.h \
    $(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view.h
  
  public_api_slider_header_files = \
@@@ -203,11 -180,6 +179,6 @@@ public_api_text_controls_header_files 
  public_api_tool_bar_header_files = \
    $(public_api_src_dir)/controls/tool-bar/tool-bar.h
  
- public_api_navigation_frame_header_files = \
-   $(public_api_src_dir)/controls/navigation-frame/navigation-bar-style.h \
-   $(public_api_src_dir)/controls/navigation-frame/navigation-control.h \
-   $(public_api_src_dir)/controls/navigation-frame/page.h
  public_api_focus_manager_header_files = \
    $(public_api_src_dir)/focus-manager/focus-manager.h \
    $(public_api_src_dir)/focus-manager/keyboard-focus-manager.h \