[dali_1.3.23] Merge branch 'devel/master' 68/177968/1
authorAngelos Gkountis <a.gkountis@samsung.com>
Fri, 4 May 2018 15:29:09 +0000 (16:29 +0100)
committerAngelos Gkountis <a.gkountis@samsung.com>
Fri, 4 May 2018 15:29:09 +0000 (16:29 +0100)
Change-Id: Iea89679e0d5d47d7d97b06098811894145cb5580

20 files changed:
automated-tests/README.md
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-BidirectionalSupport.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-MultiLanguage.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Segmentation.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h
dali-toolkit/devel-api/visual-factory/visual-base.cpp
dali-toolkit/devel-api/visual-factory/visual-base.h
dali-toolkit/internal/controls/control/control-debug.cpp [new file with mode: 0644]
dali-toolkit/internal/controls/control/control-debug.h [new file with mode: 0644]
dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 72d7473..0ca2dd0 100644 (file)
@@ -23,6 +23,14 @@ $ sudo locale-gen en
 $ sudo locale-gen ar
 $ sudo update-locale
 
+Installing fonts required by tests
+----------------------------------
+
+The test suite requires certain fonts in the repository to be installed:
+
+$ mkdir -p ~/.fonts
+$ cp -r resources/fonts/* ~/.fonts/
+$ fc-cache
 
 Quickstart
 ----------
index 902b00d..037fd71 100755 (executable)
@@ -72,7 +72,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
     dali-toolkit
 )
 
-ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
+ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED )
 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
 
 ADD_DEFINITIONS(-DTEST_RESOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/../../resources\" )
index 7768344..b977ec3 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -109,7 +109,8 @@ void CreateTextModel( const std::string& text,
   Vector<Character>& utf32Characters = logicalModel->mText;
   utf32Characters.Resize( text.size() );
 
-  const uint32_t numberOfCharacters = Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( text.c_str() ),
+  const uint32_t numberOfCharacters = ( text.size() == 0) ? 0 :
+    Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( text.c_str() ),
                                                    text.size(),
                                                    &utf32Characters[0u] );
   utf32Characters.Resize( numberOfCharacters );
index 37b5277..cb33f00 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -439,8 +439,11 @@ bool GetCharactersDirectionTest( const GetCharactersDirectionData& data )
   // 2) Clear the direction info data.
   Vector<CharacterDirection>& directions = logicalModel->mCharacterDirections;
 
-  directions.Erase( directions.Begin() + data.startIndex,
-                    directions.Begin() + data.startIndex + data.numberOfCharacters );
+  if( directions.Count() >= data.startIndex + data.numberOfCharacters )
+  {
+    directions.Erase( directions.Begin() + data.startIndex,
+                      directions.Begin() + data.startIndex + data.numberOfCharacters );
+  }
 
   // 3) Call GetCharactersDirection() function.
 
index 09e2873..c7e8c39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -25,6 +25,8 @@
 #include <dummy-visual.h>
 #include <../dali-toolkit/dali-toolkit-test-utils/dummy-control.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/internal/controls/control/control-debug.h>
+
 
 using namespace Dali;
 using namespace Toolkit;
@@ -67,3 +69,25 @@ int UtcDaliControlActionOnVisual(void)
 
   END_TEST;
 }
+
+int UtcDaliControlDebugHierarchy(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "Create a control hierarchy, and test that the debug produces output" );
+
+  auto tableView = Toolkit::TableView::New(1, 2);
+  tableView.AddChild( ImageView::New( TEST_RESOURCE_DIR "/gallery-small-1.jpg" ), TableView::CellPosition( 1, 1 ) );
+  tableView.AddChild( TextLabel::New("Stuff"), TableView::CellPosition( 1, 2 ) );
+
+  Stage::GetCurrent().Add( tableView );
+
+  Property::Value v(Matrix3::IDENTITY);
+  tableView.RegisterProperty( "SomeMatrix3", v);
+
+  std::ostringstream oss;
+  Dali::Toolkit::Internal::DumpControlHierarchy( oss, Stage::GetCurrent().GetRootLayer() );
+  DALI_TEST_CHECK( oss.str().length() != 0 );
+  tet_printf("Control hierarchy: \n%s\n", oss.str().c_str() );
+
+  END_TEST;
+}
index dbb0e94..94bb485 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -178,9 +178,11 @@ bool ScriptsTest( const ScriptsData& data )
   Vector<Character> utf32;
   utf32.Resize( data.text.size() );
 
-  const uint32_t numberOfCharacters = Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
-                                                   data.text.size(),
-                                                   &utf32[0u] );
+  const uint32_t numberOfCharacters = ( data.text.size() == 0 ) ? 0 :
+    Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
+                 data.text.size(),
+                 &utf32[0u] );
+
   utf32.Resize( numberOfCharacters );
 
   // 2) Set the script info.
@@ -255,7 +257,8 @@ bool ValidateFontTest( const ValidateFontsData& data )
   Vector<Character> utf32;
   utf32.Resize( data.text.size() );
 
-  const uint32_t numberOfCharacters = Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
+  const uint32_t numberOfCharacters = (data.text.size() == 0 ) ? 0 :
+    Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
                                                    data.text.size(),
                                                    &utf32[0u] );
   utf32.Resize( numberOfCharacters );
index 5366164..cfbf325 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -56,9 +56,10 @@ bool LineBreakInfoTest( const BreakInfoData& data )
   Vector<Character> utf32;
   utf32.Resize( data.text.size() );
 
-  const uint32_t numberOfCharacters = Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
-                                                   data.text.size(),
-                                                   &utf32[0u] );
+  const uint32_t numberOfCharacters = ( data.text.size() == 0 ) ? 0 :
+    Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
+                 data.text.size(),
+                 &utf32[0u] );
 
   utf32.Resize( numberOfCharacters );
 
@@ -113,9 +114,10 @@ bool WordBreakInfoTest( const BreakInfoData& data )
   Vector<Character> utf32;
   utf32.Resize( data.text.size() );
 
-  const uint32_t numberOfCharacters = Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
-                                                   data.text.size(),
-                                                   &utf32[0u] );
+  const uint32_t numberOfCharacters = ( data.text.size() == 0 ) ? 0 :
+    Utf8ToUtf32( reinterpret_cast<const uint8_t* const>( data.text.c_str() ),
+                 data.text.size(),
+                 &utf32[0u] );
 
   utf32.Resize( numberOfCharacters );
 
index 06350f5..e5d4a70 100644 (file)
@@ -38,6 +38,8 @@ class TestRenderSurface : public RenderSurface
 public:
   virtual PositionSize GetPositionSize() const { PositionSize size; return size; }
 
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { dpiHorizontal = dpiVertical = 96; }
+
   virtual void InitializeEgl( EglInterface& egl ) {}
 
   virtual void CreateEglSurface( EglInterface& egl ) {}
index 88cb626..7b20c60 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -56,7 +56,7 @@ void Visual::Base::SetName( const std::string& name )
   GetImplementation( *this ).SetName( name );
 }
 
-const std::string& Visual::Base::GetName()
+const std::string& Visual::Base::GetName() const
 {
   return GetImplementation( *this ).GetName();
 }
index 54a0310..74af0cb 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_TOOLKIT_VISUAL_BASE_H
 #define DALI_TOOLKIT_VISUAL_BASE_H
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -122,7 +122,7 @@ public:
    * Used by the styling system to animate properties
    * @return The name of the visual
    */
-  const std::string& GetName();
+  const std::string& GetName() const;
 
   /**
    * @brief Sets the transform and the control size
diff --git a/dali-toolkit/internal/controls/control/control-debug.cpp b/dali-toolkit/internal/controls/control/control-debug.cpp
new file mode 100644 (file)
index 0000000..a359dee
--- /dev/null
@@ -0,0 +1,353 @@
+/*
+ * Copyright (c) 2018 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.
+ */
+
+#include <dali/integration-api/debug.h>
+#include <dali/public-api/object/property.h>
+#include <dali/public-api/object/property-index-ranges.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/internal/controls/control/control-debug.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <iostream>
+#include <algorithm>
+#include <functional>
+
+#if defined(DEBUG_ENABLED)
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Internal
+{
+
+class JsonWriter
+{
+public:
+  JsonWriter( Property::Value& value )
+  : mValue(value)
+  {
+  }
+
+  std::string ToString()
+  {
+    std::ostringstream stream;
+    ToStream( stream );
+    return stream.str();
+  }
+
+  void ToStream( std::ostream& stream )
+  {
+    switch( mValue.GetType() )
+    {
+      case Dali::Property::BOOLEAN:
+      {
+        auto value = mValue.Get<bool>();
+        stream << ((value)?"true":"false");
+        break;
+      }
+      case Dali::Property::FLOAT:
+      {
+        stream << mValue.Get<float>();
+        break;
+      }
+      case Dali::Property::INTEGER:
+      {
+        stream << mValue.Get<int>();
+        break;
+      }
+      case Dali::Property::VECTOR2:
+      {
+        auto vector = mValue.Get<Vector2>();
+        stream << "[" << vector.x << ", " << vector.y << "]";
+        break;
+      }
+      case Dali::Property::VECTOR3:
+      {
+        auto vector = mValue.Get<Vector3>();
+        stream << "[" << vector.x << ", " << vector.y << ", " << vector.z << "]";
+        break;
+      }
+      case Dali::Property::VECTOR4:
+      {
+        auto vector = mValue.Get<Vector4>();
+        stream << "[" << vector.x << ", " << vector.y << ", " << vector.z << ", " << vector.w << "]";
+        break;
+      }
+      case Dali::Property::MATRIX3:
+      {
+        auto matrix = mValue.Get<Matrix3>();
+        stream << "[";
+        for( int i=0; i<9; ++i )
+        {
+          if( i>0)
+            stream << ",";
+          stream << matrix.AsFloat()[i];
+        }
+        stream << "]";
+        break;
+      }
+      case Dali::Property::MATRIX:
+      {
+        auto matrix = mValue.Get<Matrix>();
+        stream << "[";
+        for( int i=0; i<16; ++i )
+        {
+          if( i>0)
+            stream << ",";
+          stream << matrix.AsFloat()[i];
+        }
+        stream << "]";
+        break;
+      }
+      case Dali::Property::RECTANGLE:
+      {
+        auto vector = mValue.Get<Rect<int> >();
+        stream << "[" << vector.x << ", " << vector.y << ", " << vector.width << ", " << vector.height << "]";
+        break;
+      }
+      case Dali::Property::ROTATION:
+      {
+        auto angleAxis = mValue.Get<AngleAxis>();
+        stream << "[ [ " << angleAxis.axis.x << ", " << angleAxis.axis.y << ", " << angleAxis.axis.z << "], "
+               << angleAxis.angle.radian << "]";
+        break;
+      }
+      case Dali::Property::STRING:
+      {
+        stream << '"' << mValue.Get<std::string>() << '"';
+        break;
+      }
+      case Dali::Property::ARRAY:
+      {
+        auto array = mValue.GetArray();
+        stream << "[ ";
+        if( array )
+        {
+          for( Property::Array::SizeType i=0; i<array->Size(); ++i)
+          {
+            if( i>0)
+              stream << ", ";
+            auto outValue = JsonWriter( array->GetElementAt(i) );
+            stream << outValue.ToString();
+          }
+        }
+        stream << "]";
+        break;
+      }
+      case Dali::Property::MAP:
+      {
+        auto map = mValue.GetMap();
+        stream << "{ ";
+        if( map )
+        {
+          for( Property::Map::SizeType i=0; i<map->Count(); ++i)
+          {
+            if( i>0)
+              stream << ", ";
+            auto key = map->GetKeyAt( i );
+            auto outValue = JsonWriter( map->GetValue(i) );
+            stream << '\"' << key << "\":";
+            stream << outValue.ToString();
+          }
+        }
+        stream << "}";
+        break;
+      }
+      case Dali::Property::EXTENTS:
+      {
+        stream << mValue.Get<Extents>();
+        break;
+      }
+      case Dali::Property::NONE:
+      {
+        stream << "undefined type";
+        break;
+      }
+    }
+  }
+
+  Property::Value& mValue;
+};
+
+static std::ostream& operator<<( std::ostream& o, JsonWriter& value )
+{
+  value.ToStream(o);
+  return o;
+}
+
+
+std::ostream& operator<<( std::ostream& o, const RegisteredVisual& registeredVisual )
+{
+  o << "{\n" << "\"index\":" << registeredVisual.index << ",\n";
+  o << "\"enabled\":" << (registeredVisual.enabled?"true":"false") << ",\n";
+  o << "\"pending\":" << (registeredVisual.pending?"true":"false") << ",\n";
+
+  Property::Map map;
+  registeredVisual.visual.CreatePropertyMap( map );
+  o << "\"visual\": {\n\"name\":\"" << registeredVisual.visual.GetName() << "\",\n";
+  o << map << "}\n" << "\n}\n";
+  return o;
+}
+
+std::ostream& operator<<( std::ostream& o, const RegisteredVisualContainer& visualContainer )
+{
+  o<<"[\n";
+
+  bool first=true;
+  for( auto&& elem : visualContainer )
+  {
+    if(!first)
+    {
+      o << ",";
+    }
+    first = false;
+
+    o<<*elem<<"\n";
+  }
+  o<<"]\n";
+  return o;
+}
+
+std::ostream& DumpProperty( std::ostream& o, Property::Index index, Handle handle )
+{
+  auto propertyValue = handle.GetProperty( index );
+  auto jsonPropertyValue = JsonWriter(propertyValue);
+
+  o << "{\n";
+  o << "\"index\":" << index << ",\n";
+  o << "\"name\":\"" << handle.GetPropertyName( index ) << "\",\n";
+  o << "\"value\":" << jsonPropertyValue << "\n";
+  o << "}";
+  return o;
+}
+
+
+std::ostream& DumpPropertiesWithPredicate( std::ostream& o, Dali::Handle handle,
+                                           Property::IndexContainer& indices, std::function<bool(int)> predicate)
+{
+  bool first = true;
+  for( auto index : indices )
+  {
+    if( predicate( index ) )
+    {
+      if( !first )
+      {
+        o << ",";
+      }
+      o << std::endl;
+      first = false;
+      DumpProperty( o, index, handle );
+    }
+  }
+  return o;
+}
+
+std::ostream& DumpProperties( std::ostream& o, Handle handle )
+{
+  Property::IndexContainer indices;
+  handle.GetPropertyIndices( indices );
+
+  auto childPropertiesP = [](int index) -> bool
+    {
+      return CHILD_PROPERTY_REGISTRATION_START_INDEX <= index && index <= CHILD_PROPERTY_REGISTRATION_MAX_INDEX;
+    };
+  auto propertiesP = [](int index) -> bool
+    {
+      return !(CHILD_PROPERTY_REGISTRATION_START_INDEX <= index && index <= CHILD_PROPERTY_REGISTRATION_MAX_INDEX);
+    };
+
+  o << "\"childProperties\":[\n" ;
+  DumpPropertiesWithPredicate( o, handle, indices, childPropertiesP );
+  o << std::endl << "]," << std::endl;
+
+  o << "\"Properties\":[\n" ;
+  DumpPropertiesWithPredicate( o, handle, indices, propertiesP );
+  o << std::endl << "]" << std::endl;
+
+  return o;
+}
+
+std::string DumpControl( const Internal::Control& control )
+{
+  auto& controlData = Internal::Control::Impl::Get( control );
+
+  std::ostringstream oss;
+  oss << "{\n  ";
+  const std::string& name = control.Self().GetName();
+  if( ! name.empty() )
+  {
+    oss << "\"name\":\"" << name << "\",\n";
+  }
+  oss << "\"id\":\"" << control.Self().GetId() << "\",\n";
+  oss << "\"registeredVisuals\":\n" << controlData.mVisuals << ",\n";
+  oss << "\"removeVisuals\":\n" << controlData.mRemoveVisuals << ",\n";
+  oss << "\"rendererCount\":" << control.Self().GetRendererCount() << ",\n";
+  oss << "\"properties\":\n{\n";
+  DumpProperties( oss, control.Self() ) << "}\n";
+  oss << "}\n";
+  return oss.str();
+}
+
+std::string DumpActor( Actor actor )
+{
+  std::ostringstream oss;
+  oss << "{\n  ";
+  const std::string& name = actor.GetName();
+  if( ! name.empty() )
+  {
+    oss << "\"name\":\"" << name << "\",\n";
+  }
+  oss << "\"id\":\"" << actor.GetId() << "\",\n";
+  oss << "\"rendererCount\":" << actor.GetRendererCount() << ",\n";
+  oss << "\"properties\":\n{\n";
+  Toolkit::Internal::DumpProperties( oss, actor ) << "}\n";
+  oss << "}\n";
+  return oss.str();
+}
+
+void DumpControlHierarchy( std::ostream& o, Actor actor )
+{
+  auto control = Toolkit::Control::DownCast( actor );
+  o << "{\n";
+  if( control )
+  {
+    o << "\"Control\":" << DumpControl( Toolkit::Internal::GetImplementation( control ) );
+  }
+  else
+  {
+    o << "\"Actor\":" << DumpActor( actor );
+  }
+  o << ",\n\"children\":[\n";
+  bool first=true;
+  for( auto count=actor.GetChildCount(), i=0u; i<count; ++i )
+  {
+    if( !first )
+    {
+      o << ",";
+    }
+    first = false;
+    o << "\n";
+    DumpControlHierarchy( o, actor.GetChildAt( i ) );
+  }
+  o << "]}\n";
+}
+
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
+
+#endif
diff --git a/dali-toolkit/internal/controls/control/control-debug.h b/dali-toolkit/internal/controls/control/control-debug.h
new file mode 100644 (file)
index 0000000..c889ff4
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef DALI_TOOLKIT_INTERNAL_CONTROL_DEBUG_H
+#define DALI_TOOLKIT_INTERNAL_CONTROL_DEBUG_H
+/*
+ * Copyright (c) 2018 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.
+ */
+
+#if defined(DEBUG_ENABLED)
+
+#include <dali/public-api/object/handle.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <iostream>
+#include <string>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Internal
+{
+
+/**
+ * Convert properties of handle into JSON output, separated into 'normal' and 'child' properties.
+ * @param[in] ouputStream the output stream to write to
+ * @param[in] handle The handle of the object from which to retrieve properties
+ * @return The output stream
+ */
+std::ostream& DumpProperties( std::ostream& outputStream, Handle handle );
+
+/**
+ * Dumps control internals, visuals and properties to a string in JSON format
+ */
+std::string DumpControl( const Internal::Control& control );
+
+/**
+ * Dumps actor internals and properties to a string in JSON format
+ */
+std::string DumpActor( Actor actor );
+
+/**
+ * Dumps actor hierarchy from a given root, but expands Control output to encompass Control internals.
+ * Formats the output in JSON.
+ * @param[in] ouputStream the output stream to write to
+ * @param[in] root The root actor
+ */
+void DumpControlHierarchy( std::ostream& outputStream, Actor rootActor );
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif
+
+#endif //DALI_TOOLKIT_INTERNAL_CONTROL_DEBUG_H
index e1849bf..fec5df5 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -666,7 +666,7 @@ void FlexContainer::ComputeLayout()
       }
 
       Toolkit::FlexContainer::Alignment alignSelf( Toolkit::FlexContainer::ALIGN_AUTO );
-      if( childActor.GetPropertyType( Toolkit::FlexContainer::FlexContainer::ChildProperty::ALIGN_SELF ) != Property::NONE )
+      if( childActor.GetPropertyType( Toolkit::FlexContainer::ChildProperty::ALIGN_SELF ) != Property::NONE )
       {
         Property::Value alignSelfPropertyValue = childActor.GetProperty( Toolkit::FlexContainer::ChildProperty::ALIGN_SELF );
         if( alignSelfPropertyValue.GetType() == Property::INTEGER )
index a83612d..f32296b 100755 (executable)
@@ -52,6 +52,7 @@ toolkit_src_files = \
    $(toolkit_src_dir)/controls/buttons/radio-button-impl.cpp \
    $(toolkit_src_dir)/controls/buttons/toggle-button-impl.cpp \
    $(toolkit_src_dir)/controls/control/control-data-impl.cpp \
+   $(toolkit_src_dir)/controls/control/control-debug.cpp \
    $(toolkit_src_dir)/controls/effects-view/effects-view-impl.cpp \
    $(toolkit_src_dir)/controls/flex-container/flex-container-impl.cpp \
    $(toolkit_src_dir)/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp \
index d878025..7192281 100755 (executable)
@@ -1983,6 +1983,7 @@ float Controller::GetHeightForWidth( float width )
 
     // Clear the update info. This info will be set the next time the text is updated.
     mImpl->mTextUpdateInfo.Clear();
+    mImpl->mTextUpdateInfo.mClearAll = true;
 
     // Restore the actual control's width.
     mImpl->mModel->mVisualModel->mControlSize.width = actualControlWidth;
index 39e180b..a08b2c5 100644 (file)
@@ -115,6 +115,8 @@ TextureManager::MaskingData::MaskingData()
 TextureManager::TextureManager()
 : mAsyncLocalLoaders( GetNumberOfLocalLoaderThreads(), [&]() { return AsyncLoadingHelper(*this); } ),
   mAsyncRemoteLoaders( GetNumberOfRemoteLoaderThreads(), [&]() { return AsyncLoadingHelper(*this); } ),
+  mExternalTextures(),
+  mLifecycleObservers(),
   mBrokenImageUrl(""),
   mCurrentTextureId( 0 )
 {
@@ -129,13 +131,13 @@ TextureManager::~TextureManager()
 }
 
 TextureSet TextureManager::LoadTexture(
-    const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode,
-    Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo,
-    bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect,
-    bool& atlasingStatus, bool& loadingStatus, Dali::WrapMode::Type wrapModeU,
-    Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver,
-    AtlasUploadObserver* atlasObserver, ImageAtlasManagerPtr imageAtlasManager, bool orientationCorrection,
-    TextureManager::ReloadPolicy reloadPolicy, TextureManager::MultiplyOnLoad& preMultiplyOnLoad )
+  const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode,
+  Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo,
+  bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect,
+  bool& atlasingStatus, bool& loadingStatus, Dali::WrapMode::Type wrapModeU,
+  Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver,
+  AtlasUploadObserver* atlasObserver, ImageAtlasManagerPtr imageAtlasManager, bool orientationCorrection,
+  TextureManager::ReloadPolicy reloadPolicy, TextureManager::MultiplyOnLoad& preMultiplyOnLoad )
 {
   TextureSet textureSet;
 
index 05a318b..064b13d 100755 (executable)
@@ -214,7 +214,7 @@ void Visual::Base::SetName( const std::string& name )
   mImpl->mName = name;
 }
 
-const std::string& Visual::Base::GetName()
+const std::string& Visual::Base::GetName() const
 {
   return mImpl->mName;
 }
index 755409f..00c397d 100644 (file)
@@ -89,7 +89,7 @@ public:
   /**
    * @copydoc Toolkit::Visual::Base::GetName
    */
-  const std::string& GetName();
+  const std::string& GetName() const;
 
   /**
    * @copydoc Toolkit::Visual::Base::SetSize
index 7465584..4855f6a 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 3;
-const unsigned int TOOLKIT_MICRO_VERSION = 22;
+const unsigned int TOOLKIT_MICRO_VERSION = 23;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 0c2e85a..1b385b0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.3.22
+Version:    1.3.23
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT