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

@@@ -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
  {
@@@ -409,4 -380,4 +409,4 @@@ private
  
  } // namespace Dali
  
--#endif // __DALI_TOOLKIT_ATLAS_MANAGER_H__
++#endif // __DALI_TOOLKIT_ATLAS_MANAGER_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 "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>
Simple merge
  // 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;
@@@ -231,8 -181,8 +235,8 @@@ struct AtlasRenderer::Impl : public Con
            }
          }
  
-         Vector2 position = positions[ i ];
+         const Vector2& position = positions[ i ];
 -        MeshData newMeshData;
 +        AtlasManager::Mesh2D newMesh;
          mGlyphManager.Cached( glyph.fontId, glyph.index, slot );
  
          if ( slot.mImageId )
  
            // 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)
@@@ -744,14 -694,13 +752,13 @@@ Text::RendererPtr AtlasRenderer::New(
    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 );
  // 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>
  
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>
  
Simple merge