[dali_1.4.5] Merge branch 'devel/master' 84/199084/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 1 Feb 2019 11:58:23 +0000 (11:58 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 1 Feb 2019 11:58:23 +0000 (11:58 +0000)
Change-Id: I7e9d2cf61caca1d3dd25c63fd22bf96c9d6b4175

43 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp
automated-tests/src/dali-toolkit/custom-layout-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp
automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
dali-toolkit/devel-api/layouting/layout-group.h
dali-toolkit/devel-api/shader-effects/dissolve-effect.h
dali-toolkit/devel-api/visual-factory/visual-factory.h
dali-toolkit/internal/helpers/color-conversion.h
dali-toolkit/internal/text/text-model.h
dali-toolkit/internal/visuals/animated-gradient/animated-gradient-visual.h
dali-toolkit/internal/visuals/animated-image/animated-image-visual.h
dali-toolkit/internal/visuals/animated-image/fixed-image-cache.h
dali-toolkit/internal/visuals/animated-image/image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-image-cache.h
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h
dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h
dali-toolkit/internal/visuals/border/border-visual.h
dali-toolkit/internal/visuals/color/color-visual.h
dali-toolkit/internal/visuals/gradient/gradient-visual.h
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/mesh/mesh-visual.h
dali-toolkit/internal/visuals/npatch/npatch-visual.h
dali-toolkit/internal/visuals/primitive/primitive-visual.h
dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h
dali-toolkit/internal/visuals/svg/svg-visual.h
dali-toolkit/internal/visuals/text/text-visual.h
dali-toolkit/internal/visuals/wireframe/wireframe-visual.h
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 0cc5c2d..71641fb 100644 (file)
@@ -41,7 +41,10 @@ const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 
 void TestDebugVisual( Visual::Base& visual, Visual::Type actualType, Vector2 expectedNaturalSize )
 {
-  DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( GetImplementation(visual) ) );
+  {
+    auto& impl = GetImplementation( visual );
+    DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( impl ) );
+  }
 
   Vector2 naturalSize;
   visual.GetNaturalSize( naturalSize );
@@ -177,7 +180,10 @@ int UtcDaliDebugRenderingGetVisual1(void)
 
   Visual::Base textVisual = factory.CreateVisual( propertyMap7 );
   DALI_TEST_CHECK( textVisual );
-  DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( GetImplementation(textVisual) ) );
+  {
+    auto&& impl = GetImplementation( textVisual );
+    DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( impl ) );
+  }
 
   Vector2 naturalSize;
   textVisual.GetNaturalSize( naturalSize );
index c87af41..92be479 100755 (executable)
@@ -35,7 +35,6 @@ using namespace Text;
 namespace
 {
 
-const char* const OPTION_SELECT_WORD("option-select_word"); // "Select Word" popup option.
 const char* const OPTION_SELECT_ALL("option-select_all");   // "Select All" popup option.
 const char* const OPTION_CUT("optionCut");                  // "Cut" popup option.
 const char* const OPTION_COPY("optionCopy");                // "Copy" popup option.
index 06c67e0..375b491 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_INTERNAL_CUSTOM_LAYOUT_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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,6 +109,8 @@ private:
    */
   void MeasureChildren( Dali::Toolkit::Internal::LayoutItemPtr childLayout, MeasureSpec widthMeasureSpec, MeasureSpec heightMeasureSpec, LayoutLength resultingWidth, LayoutLength resultingHeight );
 
+  using Dali::Toolkit::Internal::LayoutGroup::MeasureChildren; ///< To tell the compiler that we really do want to overload MeasureChildren in this class & were not trying to override it
+
   private:
 
   int mBehaviourFlags; // flags to alter behaviour of this custom layout
index bef3271..5b478ba 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -101,8 +101,7 @@ class FontClient : public BaseObject
 {
 public:
   FontClient()
-  : mDpiHorizontal( 0 ),
-    mDpiVertical( 0 )
+  : mGlyphInfo()
   {
   }
 
@@ -163,8 +162,6 @@ public:
   const GlyphInfo& GetEllipsisGlyph( PointSize26Dot6 pointSize ){return mGlyphInfo;}
   bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex ){return false;}
 private:
-  unsigned int mDpiHorizontal;
-  unsigned int mDpiVertical;
   GlyphInfo    mGlyphInfo;
 }; // class FontClient
 
@@ -172,8 +169,11 @@ private:
 class Shaping : public BaseObject
 {
 public:
-  Shaping() : mText(NULL)
-  {}
+  Shaping()
+  : mText( NULL ),
+    mNumChars( 0 )
+  {
+  }
 
   ~Shaping()
   {
@@ -255,13 +255,6 @@ inline static TextAbstraction::Internal::FontClient& GetImplementation(TextAbstr
   return static_cast<TextAbstraction::Internal::FontClient&>(handle);
 }
 
-inline static const TextAbstraction::Internal::FontClient& GetImplementation(const TextAbstraction::FontClient& fontClient)
-{
-  DALI_ASSERT_ALWAYS( fontClient && "fontClient handle is empty" );
-  const BaseObject& handle = fontClient.GetBaseObject();
-  return static_cast<const TextAbstraction::Internal::FontClient&>(handle);
-}
-
 inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstraction::Shaping& shaping)
 {
   DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
@@ -269,13 +262,6 @@ inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstract
   return static_cast<TextAbstraction::Internal::Shaping&>(handle);
 }
 
-inline static const TextAbstraction::Internal::Shaping& GetImplementation(const TextAbstraction::Shaping& shaping)
-{
-  DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
-  const BaseObject& handle = shaping.GetBaseObject();
-  return static_cast<const TextAbstraction::Internal::Shaping&>(handle);
-}
-
 
 ////////////////////////////////////////////////////////////////////////////////
 /******************************************************************************/
index 003b8ea..6a42d9c 100755 (executable)
@@ -32,14 +32,19 @@ class VectorAnimationRenderer: public Dali::BaseObject
 {
 public:
 
-  VectorAnimationRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height )
+  VectorAnimationRenderer( const std::string& url )
   : mUrl( url ),
-    mRenderer( renderer ),
-    mWidth( width ),
-    mHeight( height )
+    mRenderer(),
+    mWidth( 0 ),
+    mHeight( 0 )
   {
   }
 
+  void SetRenderer( Dali::Renderer renderer )
+  {
+    mRenderer = renderer;
+  }
+
   void SetSize( uint32_t width, uint32_t height )
   {
     mWidth = width;
@@ -96,9 +101,9 @@ inline const VectorAnimationRenderer& GetImplementation( const Dali::VectorAnima
 /*********************************  PUBLIC CLASS  *******************************/
 /********************************************************************************/
 
-VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height )
+VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url )
 {
-  Internal::Adaptor::VectorAnimationRenderer* animationRenderer = new Internal::Adaptor::VectorAnimationRenderer( url, renderer, width, height );
+  Internal::Adaptor::VectorAnimationRenderer* animationRenderer = new Internal::Adaptor::VectorAnimationRenderer( url );
 
   return VectorAnimationRenderer( animationRenderer );
 }
@@ -127,6 +132,11 @@ VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimati
   return *this;
 }
 
+void VectorAnimationRenderer::SetRenderer( Renderer renderer )
+{
+  Internal::Adaptor::GetImplementation( *this ).SetRenderer( renderer );
+}
+
 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
 {
   Internal::Adaptor::GetImplementation( *this ).SetSize( width, height );
index 52e2d41..b79213d 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -34,11 +34,15 @@ class VideoPlayer: public Dali::BaseObject
 public:
 
   VideoPlayer()
+  : mUrl(),
+    mVolumeLeft( 0.0f ),
+    mVolumeRight( 0.0f ),
+    mFinishedSignal(),
+    mMuted( false ),
+    mLooping( false),
+    mPlayPosition( 0 ),
+    mDisplyMode( Dali::VideoPlayerPlugin::DisplayMode::DST_ROI )
   {
-    mMuted = false;
-    mLooping = false;
-    mPlayPosition = 0;
-    mDisplyMode = Dali::VideoPlayerPlugin::DisplayMode::DST_ROI;
   }
 
   void SetMuted( bool muted )
@@ -84,9 +88,9 @@ public:
     return mDisplyMode;
   }
 
-  void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode )
+  void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode )
   {
-    mDisplyMode = mDisplyMode;
+    mDisplyMode = mode;
   }
 
 
index 4c80bf2..d57d6b7 100644 (file)
@@ -338,6 +338,36 @@ int UtcDaliAnimatedVectorImageVisualPlayback(void)
     value = map.Find( DevelImageVisual::Property::PLAY_STATE );
     DALI_TEST_CHECK( value->Get< int >() == static_cast< int >( DevelImageVisual::PlayState::PLAYING ) );
 
+    tet_infoline( "Off stage" );
+    dummyControl.Unparent();
+
+    application.SendNotification();
+    application.Render(16);
+
+    map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+    value = map.Find( DevelImageVisual::Property::PLAY_STATE );
+    DALI_TEST_CHECK( value->Get< int >() == static_cast< int >( DevelImageVisual::PlayState::PAUSED ) );
+
+    tet_infoline( "On stage again" );
+    Stage::GetCurrent().Add( dummyControl );
+
+    application.SendNotification();
+    application.Render(16);
+
+    map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+    value = map.Find( DevelImageVisual::Property::PLAY_STATE );
+    DALI_TEST_CHECK( value->Get< int >() == static_cast< int >( DevelImageVisual::PlayState::PAUSED ) );
+
+    tet_infoline( "Test Play action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+    value = map.Find( DevelImageVisual::Property::PLAY_STATE );
+    DALI_TEST_CHECK( value->Get< int >() == static_cast< int >( DevelImageVisual::PlayState::PLAYING ) );
+
     // Change Size
     Vector3 newSize( 100.0f, 100.0f, 0.0f );
     dummyControl.SetSize( newSize );
index e9c092d..73067bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -48,8 +48,6 @@ namespace
 static bool gIsCalledButtonCallback = false;
 static bool gIsCalledChildButtonCallback = false;
 
-const int RENDER_FRAME_INTERVAL = 16;
-
 static bool ButtonCallback( Button button )
 {
   gIsCalledButtonCallback = true;
@@ -1141,4 +1139,4 @@ int UtcDaliButtonMultiTouch(void)
   DALI_TEST_EQUALS( gIsCalledButtonCallback, true, TEST_LOCATION );
 
   END_TEST;
-}
\ No newline at end of file
+}
index cc1a62e..8e1673e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -78,9 +78,11 @@ struct TestCustomControl : public Toolkit::Internal::ControlWrapper
           mDaliProperty( Property::INVALID_INDEX ),
           mSizeSet( Vector3::ZERO ),
           mTargetSize( Vector3::ZERO ),
-          mNego( nego )
+          mNego( nego ),
+          mDepth( 0u )
   {
   }
+
   /**
    * Destructor
    */
@@ -95,6 +97,7 @@ struct TestCustomControl : public Toolkit::Internal::ControlWrapper
     OnInitialize( name );
   }
 
+  using Control::OnInitialize; ///< To tell the compiler that we really do want to overload OnInitialize in this class & were not trying to override it
   virtual void OnInitialize( const char* name ) {}
 
   // From Toolkit::Internal::ControlWrapper
index 85ba766..f7d5908 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -185,9 +185,8 @@ class TestPageFactory : public PageFactory
 {
 public:
 
-  TestPageFactory(ToolkitTestApplication& application, bool returnValidTexture = true )
-  : mApplication( application ),
-    mValidTexture( returnValidTexture )
+  TestPageFactory( bool returnValidTexture = true )
+  : mValidTexture( returnValidTexture )
   {
     mTotalPageNumber = TOTAL_PAGE_NUMBER;
   }
@@ -216,7 +215,6 @@ public:
   }
 
 private:
-  ToolkitTestApplication& mApplication;
   unsigned int            mTotalPageNumber;
   bool                    mValidTexture;
 };
@@ -244,7 +242,7 @@ int UtcDaliPageTurnPortraitViewNew(void)
   DALI_TEST_CHECK( !portraitView );
 
   // Test object creation
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   portraitView = PageTurnPortraitView::New( factory, PAGE_SIZE );
   DALI_TEST_CHECK( portraitView );
 
@@ -255,7 +253,7 @@ int UtcDaliPageTurnPortraitViewNew(void)
   gObjectCreatedCallBackCalled = false;
   registry.ObjectCreatedSignal().Connect( &TestCallback );
   {
-    TestPageFactory factory(application);
+    TestPageFactory factory;
     PageTurnView portraitView = PageTurnPortraitView::New( factory, PAGE_SIZE );
   }
   DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
@@ -284,7 +282,7 @@ int UtcDaliPageTurnLandscapeViewNew(void)
   DALI_TEST_CHECK( !landscapeView );
 
   // Test object creation
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   landscapeView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
   DALI_TEST_CHECK( landscapeView );
 
@@ -295,7 +293,7 @@ int UtcDaliPageTurnLandscapeViewNew(void)
   gObjectCreatedCallBackCalled = false;
   registry.ObjectCreatedSignal().Connect( &TestCallback );
   {
-    TestPageFactory factory(application);
+    TestPageFactory factory;
     PageTurnView landscapeView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
   }
   DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
@@ -324,7 +322,7 @@ int UtcDaliPageTurnPortraitViewCopyConstructorAndAssignment(void)
   DALI_TEST_CHECK( !portraitView );
 
   // Test object creation
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   portraitView = PageTurnPortraitView::New( factory, PAGE_SIZE );
   DALI_TEST_CHECK( portraitView );
 
@@ -358,7 +356,7 @@ int UtcDaliPageTurnLandscapeViewCopyConstructorAndAssignment(void)
   DALI_TEST_CHECK( !landscapeView );
 
   // Test object creation
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   landscapeView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
   DALI_TEST_CHECK( landscapeView );
 
@@ -387,7 +385,7 @@ int UtcDaliPageTurnViewSetGetProperty(void)
 
   tet_infoline(" UtcDaliPageTurnViewSetGetProperty ");
 
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   PageTurnView landscapeView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
   DALI_TEST_CHECK( landscapeView );
 
@@ -438,7 +436,7 @@ int UtcDaliPageTurnPortraitViewSignals(void)
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
 
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   Vector2 size = Stage::GetCurrent().GetSize();
   PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
   portraitView.SetParentOrigin( ParentOrigin::CENTER );
@@ -575,7 +573,7 @@ int UtcDaliPageTurnLanscapeViewSignals(void)
    * ----------------
    */
 
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
   landscapeView.SetParentOrigin( ParentOrigin::CENTER );
@@ -687,7 +685,7 @@ int UtcDaliPageTurnLanscapeViewSignals(void)
 int UtcDaliPageImageFactoryGetExtention(void)
 {
   ToolkitTestApplication application;
-  TestPageFactory factory(application);
+  TestPageFactory factory;
   DALI_TEST_CHECK( factory.GetExtension() == NULL );
   END_TEST;
 }
@@ -700,7 +698,7 @@ int UtcDaliPageTurnEmptyTextureHandle(void)
 
   application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
 
-  TestPageFactory factory(application, false); // returns empty handles
+  TestPageFactory factory( false /* returns empty handles */ );
   Vector2 size = Stage::GetCurrent().GetSize();
   try
   {
index 99613a5..a59a708 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -58,26 +58,19 @@ struct CallbackFunctor
   bool* mCallbackFlag;
 };
 
-const int MILLISECONDS_PER_SECOND = 1000;
 const int RENDER_FRAME_INTERVAL = 16;                           ///< Duration of each frame in ms. (at approx 60FPS)
-const int RENDER_ANIMATION_TEST_DURATION_MS = 1000;             ///< 1000ms to test animation
 
 const int RENDER_DELAY_SCROLL = 1000;                           ///< duration to wait for any scroll to complete.
 
 // For Clamp Signal testing...
 const float CLAMP_EXCESS_WIDTH = 200.0f;                        ///< Amount of width that can be panned outside scrollview
 const float CLAMP_EXCESS_HEIGHT = 200.0f;                       ///< Amount of height that can be panned outside scrollview
-const int CLAMP_STEP_0_CHECK_NOTCLAMPED = 0;                    ///< FSM: "First check that scrollview isn't clamped"
-const int CLAMP_STEP_1_CHECK_CLAMPED_WEST = 1;                  ///< FSM: "Next check that scrollview clamps against left side"
-const int CLAMP_STEP_2_CHECK_CLAMPED_SOUTH_WEST = 2;            ///< FSM: "Then check that scrollview clamps against bottom-left side"
-const int CLAMP_STEP_3_SUCCESS = 3;                             ///< FSM: "Finished (Success)"
 const Vector2 CLAMP_START_SCROLL_POSITION(30.0f, 100.0f);       ///< Scroll start position for the Clamping tests.
 const Vector2 CLAMP_TOUCH_START( 100.0f, 100.0f );              ///< Start point to touch from for the Clamping tests.
 const Vector2 CLAMP_TOUCH_MOVEMENT( 5.0f, -5.0f );              ///< Amount to move touch for each frame for the Clamping tests.
 const int CLAMP_GESTURE_FRAMES = 100;                           ///< Number of Frames to synthesize a gesture for the Clamping tests.
 const Vector3 TEST_ACTOR_POSITION(100.0f, 100.0f, 0.0f);        ///< A Test actor position offset (arbitrary value)
 const Vector3 TEST_CONSTRAINT_OFFSET(1.0f, 2.0f, 0.0f);         ///< A Test constraint offset (arbitrary value to test effects)
-const float TEST_RATIO_TOLERANCE = 0.05;                        ///< +/-5% tolerance for ratio comparisons.
 
 const float DEFAULT_SNAP_OVERSHOOT_DURATION(0.5f);                  ///< Default overshoot snapping animation time.
 const float DEFAULT_MAX_OVERSHOOT(100.0f);                          ///< Default maximum allowed overshoot in pixels
index 94cc011..3e3b0e3 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -104,19 +104,11 @@ const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE                   = "enableGr
 const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION      = "matchSystemLanguageDirection";
 
 
-const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
-
 const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
 
-const unsigned int CURSOR_BLINK_INTERVAL = 500u; // Cursor blink interval
-const float TO_MILLISECONDS = 1000.f;
-const float TO_SECONDS = 1.f / TO_MILLISECONDS;
 const float RENDER_FRAME_INTERVAL = 16.66f;
 
-const float SCROLL_THRESHOLD = 10.f;
-const float SCROLL_SPEED = 300.f;
-
 const unsigned int DEFAULT_FONT_SIZE = 1152u;
 const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 
index 8c1eecd..39cd605 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -103,20 +103,11 @@ const char* const PROPERTY_NAME_ENABLE_SHIFT_SELECTION               = "enableSh
 const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE                   = "enableGrabHandle";
 const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION      = "matchSystemLanguageDirection";
 
-const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
-
 const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
 
-const unsigned int CURSOR_BLINK_INTERVAL = 500u; // Cursor blink interval
 const float RENDER_FRAME_INTERVAL = 16.66f;
 
-const float TO_MILLISECONDS = 1000.f;
-const float TO_SECONDS = 1.f / TO_MILLISECONDS;
-
-const float SCROLL_THRESHOLD = 10.f;
-const float SCROLL_SPEED = 300.f;
-
 const unsigned int DEFAULT_FONT_SIZE = 1152u;
 const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 
index 67dc221..551acf2 100755 (executable)
@@ -67,7 +67,6 @@ const char* const PROPERTY_NAME_PIXEL_SIZE = "pixelSize";
 const char* const PROPERTY_NAME_ELLIPSIS = "ellipsis";
 const char* const PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY = "autoScrollLoopDelay";
 
-const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
 const std::string DEFAULT_FONT_DIR( "/resources/fonts" );
 const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64
 
index 99cd40e..a9cf36b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -93,7 +93,7 @@ int UtcDaliToolBarNew(void)
   DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
 
   Actor actor = toolbar;
-  toolbar == ToolBar::DownCast( actor );
+  toolbar = ToolBar::DownCast( actor );
 
   DALI_TEST_CHECK( toolbar );
   END_TEST;
index 4962032..45aec98 100755 (executable)
@@ -1,7 +1,7 @@
 #ifndef DALI_TOOLKIT_LAYOUTING_LAYOUT_GROUP_H
 #define DALI_TOOLKIT_LAYOUTING_LAYOUT_GROUP_H
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -54,14 +54,6 @@ public:
   using LayoutId = unsigned int;
   static const unsigned int UNKNOWN_ID = 0;
 
-  struct ChildProperty
-  {
-    enum
-    {
-    };
-  };
-
-
   /**
    * @brief Creates an uninitialized LayoutGroup handle.
    *
index b0660be..a4ae564 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H_
+#ifndef DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H
 #define DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
index 454919a..0a86754 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -29,7 +29,7 @@
 namespace Dali
 {
 class Image;
-class Vector4;
+struct Vector4;
 
 namespace Toolkit
 {
index dcd51bd..2838dc3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_COLOR_CONVERSION_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -24,7 +24,7 @@
 namespace Dali
 {
 
-class Vector4;
+struct Vector4;
 
 namespace Toolkit
 {
index 688eac4..f4fbd7b 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MODEL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -61,27 +61,27 @@ public:
   /**
    * @copydoc ModelInterface::GetControlSize()
    */
-  virtual const Size& GetControlSize() const;
+  virtual const Size& GetControlSize() const override;
 
   /**
    * @copydoc ModelInterface::GetLayoutSize()
    */
-  virtual const Size& GetLayoutSize() const;
+  virtual const Size& GetLayoutSize() const override;
 
   /**
    * @copydoc ModelInterface::GetScrollPosition()
    */
-  virtual const Vector2& GetScrollPosition() const;
+  virtual const Vector2& GetScrollPosition() const override;
 
   /**
    * @copydoc ModelInterface::GetHorizontalAlignment()
    */
-  virtual HorizontalAlignment::Type GetHorizontalAlignment() const;
+  virtual HorizontalAlignment::Type GetHorizontalAlignment() const override;
 
   /**
    * @copydoc ModelInterface::GetVerticalAlignment()
    */
-  virtual VerticalAlignment::Type GetVerticalAlignment() const;
+  virtual VerticalAlignment::Type GetVerticalAlignment() const override;
 
   /**
    * @copydoc ModelInterface::GetVerticalLineAlignment()
@@ -91,117 +91,117 @@ public:
   /**
    * @copydoc ModelInterface::IsTextElideEnabled()
    */
-  virtual bool IsTextElideEnabled() const;
+  virtual bool IsTextElideEnabled() const override;
 
   /**
    * @copydoc ModelInterface::GetNumberOfLines()
    */
-  virtual Length GetNumberOfLines() const;
+  virtual Length GetNumberOfLines() const override;
 
   /**
    * @copydoc ModelInterface::GetLines()
    */
-  virtual const LineRun* const GetLines() const;
+  virtual const LineRun* const GetLines() const override;
 
   /**
    * @copydoc ModelInterface::GetNumberOfScripts()
    */
-  virtual Length GetNumberOfScripts() const;
+  virtual Length GetNumberOfScripts() const override;
 
   /**
    * @copydoc ModelInterface::GetScriptRuns()
    */
-  virtual const ScriptRun* const GetScriptRuns() const;
+  virtual const ScriptRun* const GetScriptRuns() const override;
 
   /**
    * @copydoc ModelInterface::GetNumberOfGlyphs()
    */
-  virtual Length GetNumberOfGlyphs() const;
+  virtual Length GetNumberOfGlyphs() const override;
 
   /**
    * @copydoc ModelInterface::GetGlyphs()
    */
-  virtual const GlyphInfo* const GetGlyphs() const;
+  virtual const GlyphInfo* const GetGlyphs() const override;
 
   /**
    * @copydoc ModelInterface::GetLayout()
    */
-  virtual const Vector2* const GetLayout() const;
+  virtual const Vector2* const GetLayout() const override;
 
   /**
    * @copydoc ModelInterface::GetColors()
    */
-  virtual const Vector4* const GetColors() const;
+  virtual const Vector4* const GetColors() const override;
 
   /**
    * @copydoc ModelInterface::GetColorIndices()
    */
-  virtual const ColorIndex* const GetColorIndices() const;
+  virtual const ColorIndex* const GetColorIndices() const override;
 
   /**
    * @copydoc ModelInterface::GetDefaultColor()
    */
-  virtual const Vector4& GetDefaultColor() const;
+  virtual const Vector4& GetDefaultColor() const override;
 
   /**
    * @copydoc ModelInterface::GetShadowOffset()
    */
-  virtual const Vector2& GetShadowOffset() const;
+  virtual const Vector2& GetShadowOffset() const override;
 
   /**
    * @copydoc ModelInterface::GetShadowColor()
    */
-  virtual const Vector4& GetShadowColor() const;
+  virtual const Vector4& GetShadowColor() const override;
 
   /**
    * @copydoc ModelInterface::GetShadowBlurRadius()
    */
-  virtual const float& GetShadowBlurRadius() const;
+  virtual const float& GetShadowBlurRadius() const override;
 
   /**
    * @copydoc ModelInterface::GetUnderlineColor()
    */
-  virtual const Vector4& GetUnderlineColor() const;
+  virtual const Vector4& GetUnderlineColor() const override;
 
   /**
    * @copydoc ModelInterface::IsUnderlineEnabled()
    */
-  virtual bool IsUnderlineEnabled() const;
+  virtual bool IsUnderlineEnabled() const override;
 
   /**
    * @copydoc ModelInterface::GetUnderlineHeight()
    */
-  virtual float GetUnderlineHeight() const;
+  virtual float GetUnderlineHeight() const override;
 
   /**
    * @copydoc ModelInterface::GetNumberOfUnderlineRuns()
    */
-  virtual Length GetNumberOfUnderlineRuns() const;
+  virtual Length GetNumberOfUnderlineRuns() const override;
 
   /**
    * @copydoc ModelInterface::GetUnderlineRuns()
    */
-  virtual void GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const;
+  virtual void GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const override;
 
   /**
    * @copydoc ModelInterface::GetOutlineColor()
    */
-  virtual const Vector4& GetOutlineColor() const;
+  virtual const Vector4& GetOutlineColor() const override;
 
   /**
    * @copydoc ModelInterface::GetOutlineWidth()
    */
-  virtual float GetOutlineWidth() const;
+  virtual float GetOutlineWidth() const override;
 
   /**
    * @copydoc ModelInterface::GetBackgroundColor()
    */
-  virtual const Vector4& GetBackgroundColor() const;
+  virtual const Vector4& GetBackgroundColor() const override;
 
   /**
    * @copydoc ModelInterface::IsBackgroundEnabled()
    */
-  virtual bool IsBackgroundEnabled() const;
+  virtual bool IsBackgroundEnabled() const override;
 
 private: // Private contructors & copy operator.
 
index ab480d9..28e820a 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_GRADIENT_VISUAL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -173,12 +173,12 @@ private: //from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -199,22 +199,22 @@ protected: //from Visual
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor );
+  void DoSetOffStage( Actor& actor ) override;
 
 private:
 
index dcd48ce..791783d 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -123,22 +123,22 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  virtual void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
+  void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
 
 protected:
 
@@ -158,7 +158,7 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * Helper method to set individual values by index key.
@@ -170,17 +170,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor );
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 private:
   /**
index 570b2d7..ceb9fff 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_FIXED_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -52,14 +52,14 @@ public:
    * Get the first frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  virtual TextureSet FirstFrame();
+  TextureSet FirstFrame() override;
 
   /**
    * Get the next frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    * This will trigger the loading of the next batch.
    */
-  virtual TextureSet NextFrame();
+  TextureSet NextFrame() override;
 
 private:
   /**
@@ -90,7 +90,7 @@ private:
   void CheckFrontFrame( bool wasReady );
 
 protected:
-  virtual void UploadComplete(
+  void UploadComplete(
     bool           loadSuccess,
     int32_t        textureId,
     TextureSet     textureSet,
index e8277de..ef1efed 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -86,10 +86,11 @@ public:
   virtual TextureSet NextFrame() = 0;
 
 private:
+
   /**
    * Called before the texture manager is destroyed.
    */
-  virtual void TextureManagerDestroyed() override final;
+  void TextureManagerDestroyed() final;
 
 protected:
   TextureManager&        mTextureManager;
index d912ab3..981274c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROLLING_GIF_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -68,14 +68,14 @@ public:
    * Get the first frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  virtual TextureSet FirstFrame();
+  TextureSet FirstFrame() override;
 
   /**
    * Get the next frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    * This will trigger the loading of the next batch.
    */
-  virtual TextureSet NextFrame();
+  TextureSet NextFrame() override;
 
 private:
   /**
index 76a79ec..c5650cf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROLLING_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -63,14 +63,14 @@ public:
    * Get the first frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  virtual TextureSet FirstFrame();
+  TextureSet FirstFrame() override;
 
   /**
    * Get the next frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    * This will trigger the loading of the next batch.
    */
-  virtual TextureSet NextFrame();
+  TextureSet NextFrame() override;
 
 private:
   /**
@@ -106,7 +106,7 @@ private:
   void CheckFrontFrame( bool wasReady );
 
 protected:
-  virtual void UploadComplete(
+  void UploadComplete(
     bool           loadSuccess,
     int32_t        textureId,
     TextureSet     textureSet,
index f4a733b..dbbb619 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
-#include <dali/devel-api/common/stage-devel.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -32,7 +32,6 @@
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
-#include <dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h>
 
 namespace Dali
 {
@@ -47,7 +46,6 @@ namespace
 {
 
 const Dali::Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
-constexpr auto LOOP_FOREVER = -1;
 
 } // unnamed namespace
 
@@ -70,15 +68,18 @@ AnimatedVectorImageVisual::AnimatedVectorImageVisual( VisualFactoryCache& factor
 : Visual::Base( factoryCache, Visual::FittingMode::FILL ),
   mImageVisualShaderFactory( shaderFactory ),
   mUrl( imageUrl ),
+  mVectorRasterizeThread( imageUrl.GetUrl() ),
   mVisualSize(),
-  mPlayRange( 0.0f, 1.0f ),
   mPlacementActor(),
-  mVectorRasterizeThread(),
-  mLoopCount( LOOP_FOREVER ),
   mActionStatus( DevelAnimatedVectorImageVisual::Action::STOP )
 {
   // the rasterized image is with pre-multiplied alpha format
   mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
+
+  mVectorRasterizeThread.SetResourceReadyCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnResourceReady ) ) );
+  mVectorRasterizeThread.SetAnimationFinishedCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnAnimationFinished ) ) );
+
+  mVectorRasterizeThread.Start();
 }
 
 AnimatedVectorImageVisual::~AnimatedVectorImageVisual()
@@ -98,17 +99,9 @@ void AnimatedVectorImageVisual::DoCreatePropertyMap( Property::Map& map ) const
   {
     map.Insert( Toolkit::ImageVisual::Property::URL, mUrl.GetUrl() );
   }
-  map.Insert( Toolkit::DevelImageVisual::Property::LOOP_COUNT, static_cast< int >( mLoopCount ) );
-  map.Insert( Toolkit::DevelImageVisual::Property::PLAY_RANGE, static_cast< Vector2 >( mPlayRange ) );
-
-  if( mVectorRasterizeThread )
-  {
-    map.Insert( Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast< int >( mVectorRasterizeThread->GetPlayState() ) );
-  }
-  else
-  {
-    map.Insert( Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast< int >( DevelImageVisual::PlayState::STOPPED ) );
-  }
+  map.Insert( Toolkit::DevelImageVisual::Property::LOOP_COUNT, static_cast< int >( mVectorRasterizeThread.GetLoopCount() ) );
+  map.Insert( Toolkit::DevelImageVisual::Property::PLAY_RANGE, static_cast< Vector2 >( mVectorRasterizeThread.GetPlayRange() ) );
+  map.Insert( Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast< int >( mVectorRasterizeThread.GetPlayState() ) );
 }
 
 void AnimatedVectorImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
@@ -149,11 +142,7 @@ void AnimatedVectorImageVisual::DoSetProperty( Property::Index index, const Prop
       int32_t loopCount;
       if( value.Get( loopCount ) )
       {
-        mLoopCount = loopCount;
-        if( mVectorRasterizeThread )
-        {
-          mVectorRasterizeThread->SetLoopCount( loopCount );
-        }
+        mVectorRasterizeThread.SetLoopCount( loopCount );
       }
       break;
     }
@@ -162,23 +151,7 @@ void AnimatedVectorImageVisual::DoSetProperty( Property::Index index, const Prop
       Vector2 range;
       if( value.Get( range ) )
       {
-        // Make sure the range specified is between 0.0 and 1.0
-        if( range.x >= 0.0f && range.x <= 1.0f && range.y >= 0.0f && range.y <= 1.0f )
-        {
-          Vector2 orderedRange( range );
-          // If the range is not in order swap values
-          if( range.x > range.y )
-          {
-            orderedRange = Vector2( range.y, range.x );
-          }
-
-          mPlayRange = orderedRange;
-
-          if( mVectorRasterizeThread )
-          {
-            mVectorRasterizeThread->SetPlayRange( mPlayRange );
-          }
-        }
+        mVectorRasterizeThread.SetPlayRange( range );
       }
       break;
     }
@@ -217,21 +190,19 @@ void AnimatedVectorImageVisual::DoSetOnStage( Actor& actor )
   // Hold the weak handle of the placement actor and delay the adding of renderer until the rasterization is finished.
   mPlacementActor = actor;
 
-  // This visual needs it's size set before it can be rasterized hence set ResourceReady once on stage
-  ResourceReady( Toolkit::Visual::ResourceStatus::READY );
+  mVectorRasterizeThread.SetRenderer( mImpl->mRenderer );
 }
 
 void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
 {
-  if( mVectorRasterizeThread )
-  {
-    mVectorRasterizeThread->PauseAnimation();
-    DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
-    mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
-  }
+  mVectorRasterizeThread.PauseAnimation();
+
+  mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
 
   if( mImpl->mRenderer )
   {
+    mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
+
     actor.RemoveRenderer( mImpl->mRenderer );
     mImpl->mRenderer.Reset();
   }
@@ -252,38 +223,34 @@ void AnimatedVectorImageVisual::OnSetTransform()
     {
       mVisualSize = visualSize;
 
-      if( !mVectorRasterizeThread )
+      uint32_t width = static_cast< uint32_t >( visualSize.width );
+      uint32_t height = static_cast< uint32_t >( visualSize.height );
+
+      mVectorRasterizeThread.SetSize( width, height );
+    }
+
+    if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+    {
+      mVectorRasterizeThread.PlayAnimation();
+
+      mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY );
+    }
+    else
+    {
+      // Render one frame
+      mVectorRasterizeThread.RenderFrame();
+    }
+
+    if( mVectorRasterizeThread.IsResourceReady() )
+    {
+      Actor actor = mPlacementActor.GetHandle();
+      if( actor )
       {
-        uint32_t width = static_cast< uint32_t >( visualSize.width );
-        uint32_t height = static_cast< uint32_t >( visualSize.height );
-
-        mVectorRasterizeThread = std::unique_ptr< VectorRasterizeThread >( new VectorRasterizeThread( mUrl.GetUrl(), mImpl->mRenderer, width, height ) );
-
-        mVectorRasterizeThread->SetResourceReadyCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnResourceReady ) ) );
-        mVectorRasterizeThread->SetAnimationFinishedCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnAnimationFinished ) ) );
-        mVectorRasterizeThread->SetLoopCount( mLoopCount );
-        mVectorRasterizeThread->SetPlayRange( mPlayRange );
-
-        mVectorRasterizeThread->Start();
-
-        if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
-        {
-          mVectorRasterizeThread->StartAnimation();
-          DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::CONTINUOUSLY );
-        }
-        else
-        {
-          // Render one frame
-          mVectorRasterizeThread->RenderFrame();
-        }
+        actor.AddRenderer( mImpl->mRenderer );
+        mPlacementActor.Reset();
       }
-      else
-      {
-        uint32_t width = static_cast< uint32_t >( visualSize.width );
-        uint32_t height = static_cast< uint32_t >( visualSize.height );
 
-        mVectorRasterizeThread->SetSize( width, height );
-      }
+      ResourceReady( Toolkit::Visual::ResourceStatus::READY );
     }
   }
 }
@@ -295,44 +262,34 @@ void AnimatedVectorImageVisual::OnDoAction( const Property::Index actionId, cons
   {
     case DevelAnimatedVectorImageVisual::Action::PLAY:
     {
-      if( IsOnStage())
+      if( IsOnStage() )
       {
-        if( mVectorRasterizeThread )
-        {
-          mVectorRasterizeThread->StartAnimation();
-          DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::CONTINUOUSLY );   //TODO: Should manage this globally
-        }
+        mVectorRasterizeThread.PlayAnimation();
+
+        mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY );
       }
       mActionStatus = DevelAnimatedVectorImageVisual::Action::PLAY;
       break;
     }
     case DevelAnimatedVectorImageVisual::Action::PAUSE:
     {
-      if( mVectorRasterizeThread )
+      mVectorRasterizeThread.PauseAnimation();
+
+      if( mImpl->mRenderer )
       {
-        mVectorRasterizeThread->PauseAnimation();
-        DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
+        mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
       }
+
       mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
       break;
     }
     case DevelAnimatedVectorImageVisual::Action::STOP:
     {
-      if( mVectorRasterizeThread )
+      if( mVectorRasterizeThread.GetPlayState() != DevelImageVisual::PlayState::STOPPED )
       {
-        bool emitSignal = false;
-        if( mVectorRasterizeThread->GetPlayState() != DevelImageVisual::PlayState::STOPPED )
-        {
-          emitSignal = true;
-        }
-
-        mVectorRasterizeThread->StopAnimation();
-        DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
-
-        if( emitSignal )
-        {
-          OnAnimationFinished();
-        }
+        mVectorRasterizeThread.StopAnimation();
+
+        OnAnimationFinished();
       }
       mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
       break;
@@ -349,9 +306,9 @@ void AnimatedVectorImageVisual::OnResourceReady()
     actor.AddRenderer( mImpl->mRenderer );
     // reset the weak handle so that the renderer only get added to actor once
     mPlacementActor.Reset();
-
-    Stage::GetCurrent().KeepRendering( 0.0f );
   }
+
+  ResourceReady( Toolkit::Visual::ResourceStatus::READY );
 }
 
 void AnimatedVectorImageVisual::OnAnimationFinished()
@@ -360,6 +317,13 @@ void AnimatedVectorImageVisual::OnAnimationFinished()
   {
     mImpl->mEventObserver->NotifyVisualEvent( *this, DevelAnimatedVectorImageVisual::Signal::ANIMATION_FINISHED );
   }
+
+  mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
+
+  if( mImpl->mRenderer )
+  {
+    mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
+  }
 }
 
 } // namespace Internal
index 28d79a4..5d871f0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -27,6 +27,7 @@
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
 #include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
+#include <dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h>
 
 namespace Dali
 {
@@ -83,17 +84,17 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -114,27 +115,27 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor ) override;
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor ) override;
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform() override;
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  virtual void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+  void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
 
 private:
 
@@ -164,12 +165,9 @@ private:
 private:
   ImageVisualShaderFactory&                    mImageVisualShaderFactory;
   VisualUrl                                    mUrl;
+  VectorRasterizeThread                        mVectorRasterizeThread;
   Vector2                                      mVisualSize;
-  Vector2                                      mPlayRange;
   WeakHandle< Actor >                          mPlacementActor;
-  std::unique_ptr< VectorRasterizeThread >     mVectorRasterizeThread;
-
-  int32_t                                      mLoopCount;
   DevelAnimatedVectorImageVisual::Action::Type mActionStatus;
 };
 
index 536c208..35f485f 100644 (file)
@@ -45,7 +45,7 @@ Debug::Filter* gVectorAnimationLogFilter = Debug::Filter::New( Debug::NoLogging,
 
 } // unnamed namespace
 
-VectorRasterizeThread::VectorRasterizeThread( const std::string& url, Renderer renderer, uint32_t width, uint32_t height )
+VectorRasterizeThread::VectorRasterizeThread( const std::string& url )
 : mUrl( url ),
   mVectorRenderer(),
   mConditionalWait(),
@@ -54,12 +54,13 @@ VectorRasterizeThread::VectorRasterizeThread( const std::string& url, Renderer r
   mAnimationFinishedTrigger(),
   mPlayRange( 0.0f, 1.0f ),
   mPlayState( DevelImageVisual::PlayState::STOPPED ),
+  mProgress( 0.0f ),
   mCurrentFrame( 0 ),
   mTotalFrame( 0 ),
   mStartFrame( 0 ),
   mEndFrame( 0 ),
-  mWidth( width ),
-  mHeight( height ),
+  mWidth( 0 ),
+  mHeight( 0 ),
   mLoopCount( LOOP_FOREVER ),
   mCurrentLoop( 0 ),
   mNeedRender( false ),
@@ -67,7 +68,7 @@ VectorRasterizeThread::VectorRasterizeThread( const std::string& url, Renderer r
   mResourceReady( false ),
   mLogFactory( Dali::Adaptor::Get().GetLogFactory() )
 {
-  mVectorRenderer = VectorAnimationRenderer::New( mUrl, renderer, width, height );
+  mVectorRenderer = VectorAnimationRenderer::New( mUrl );
 }
 
 VectorRasterizeThread::~VectorRasterizeThread()
@@ -101,15 +102,32 @@ void VectorRasterizeThread::Run()
   }
 }
 
-void VectorRasterizeThread::SetSize( uint32_t width, uint32_t height )
+void VectorRasterizeThread::SetRenderer( Renderer renderer )
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
-  mVectorRenderer.SetSize( width, height );
 
-  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetSize: width = %d, height = %d\n", width, height );
+  mVectorRenderer.SetRenderer( renderer );
+
+  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetRenderer\n" );
+}
+
+void VectorRasterizeThread::SetSize( uint32_t width, uint32_t height )
+{
+  if( mWidth != width || mHeight != height )
+  {
+    ConditionalWait::ScopedLock lock( mConditionalWait );
+    mVectorRenderer.SetSize( width, height );
+
+    mWidth = width;
+    mHeight = height;
+
+    mResourceReady = false;
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetSize: width = %d, height = %d\n", width, height );
+  }
 }
 
-void VectorRasterizeThread::StartAnimation()
+void VectorRasterizeThread::PlayAnimation()
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
   if( mPlayState != DevelImageVisual::PlayState::PLAYING )
@@ -124,7 +142,7 @@ void VectorRasterizeThread::StartAnimation()
     mPlayState = DevelImageVisual::PlayState::PLAYING;
     mConditionalWait.Notify( lock );
 
-    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StartAnimation: Start\n" );
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PlayAnimation: Start\n" );
   }
 }
 
@@ -171,7 +189,7 @@ void VectorRasterizeThread::SetAnimationFinishedCallback( EventThreadCallback* c
   mAnimationFinishedTrigger = std::unique_ptr< EventThreadCallback >( callback );
 }
 
-void VectorRasterizeThread::SetLoopCount( int16_t count )
+void VectorRasterizeThread::SetLoopCount( int32_t count )
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
 
@@ -182,24 +200,50 @@ void VectorRasterizeThread::SetLoopCount( int16_t count )
   mCurrentFrame = mStartFrame;
 }
 
+int32_t VectorRasterizeThread::GetLoopCount() const
+{
+  return mLoopCount;
+}
+
 void VectorRasterizeThread::SetPlayRange( Vector2 range )
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
 
-  mPlayRange = range;
-
-  if( mTotalFrame != 0 )
+  // Make sure the range specified is between 0.0 and 1.0
+  if( range.x >= 0.0f && range.x <= 1.0f && range.y >= 0.0f && range.y <= 1.0f )
   {
-    mStartFrame = static_cast< uint32_t >( mPlayRange.x * mTotalFrame + 0.5f );
-    mEndFrame = static_cast< uint32_t >( mPlayRange.y * mTotalFrame + 0.5f );
+    Vector2 orderedRange( range );
+    // If the range is not in order swap values
+    if( range.x > range.y )
+    {
+      orderedRange = Vector2( range.y, range.x );
+    }
+
+    mPlayRange = orderedRange;
+
+    if( mTotalFrame != 0 )
+    {
+      mStartFrame = static_cast< uint32_t >( mPlayRange.x * mTotalFrame + 0.5f );
+      mEndFrame = static_cast< uint32_t >( mPlayRange.y * mTotalFrame + 0.5f );
+    }
   }
 }
 
-DevelImageVisual::PlayState VectorRasterizeThread::GetPlayState()
+Vector2 VectorRasterizeThread::GetPlayRange() const
+{
+  return mPlayRange;
+}
+
+DevelImageVisual::PlayState VectorRasterizeThread::GetPlayState() const
 {
   return mPlayState;
 }
 
+bool VectorRasterizeThread::IsResourceReady() const
+{
+  return mResourceReady;
+}
+
 bool VectorRasterizeThread::IsThreadReady()
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
index 8ee52be..f8d409b 100644 (file)
@@ -50,11 +50,8 @@ public:
    * @brief Constructor.
    *
    * @param[in] url The url of the vector animation file
-   * @param[in] renderer The renderer used to render the image
-   * @param[in] width The width of the content
-   * @param[in] height The height of the content
    */
-  VectorRasterizeThread( const std::string& url, Renderer renderer, uint32_t width, uint32_t height );
+  VectorRasterizeThread( const std::string& url );
 
   /**
    * @brief Destructor.
@@ -62,6 +59,13 @@ public:
   virtual ~VectorRasterizeThread();
 
   /**
+   * @brief Sets the renderer used to display the result image.
+   *
+   * @param[in] renderer The renderer used to display the result image
+   */
+  void SetRenderer( Renderer renderer );
+
+  /**
    * @brief Sets the target image size.
    *
    * @param[in] width The target image width
@@ -72,7 +76,7 @@ public:
   /**
    * @brief Play the vector animation.
    */
-  void StartAnimation();
+  void PlayAnimation();
 
   /**
    * @brief Stop the vector animation.
@@ -105,7 +109,13 @@ public:
    * @brief Enable looping for 'count' repeats. -1 means to repeat forever.
    * @param[in] count The number of times to loop
    */
-  void SetLoopCount( int16_t count );
+  void SetLoopCount( int32_t count );
+
+  /**
+   * @brief Gets the loop count. -1 means to repeat forever.
+   * @return The number of times to loop
+   */
+  int32_t GetLoopCount() const;
 
   /**
    * @brief Set the playing range.
@@ -115,10 +125,22 @@ public:
   void SetPlayRange( Vector2 range );
 
   /**
+   * @brief Gets the playing range.
+   * @return The play range defined for the animation
+   */
+  Vector2 GetPlayRange() const;
+
+  /**
    * @brief Get the play state
    * @return The play state
    */
-  DevelImageVisual::PlayState GetPlayState();
+  DevelImageVisual::PlayState GetPlayState() const;
+
+  /**
+   * @brief Queries whether the resource is ready.
+   * @return true if ready, false otherwise
+   */
+  bool IsResourceReady() const;
 
 protected:
 
@@ -162,14 +184,15 @@ private:
   std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger;
   Vector2                     mPlayRange;
   DevelImageVisual::PlayState mPlayState;
+  float                       mProgress;
   uint32_t                    mCurrentFrame;
   uint32_t                    mTotalFrame;
   uint32_t                    mStartFrame;
   uint32_t                    mEndFrame;
   uint32_t                    mWidth;
   uint32_t                    mHeight;
-  int16_t                     mLoopCount;
-  int16_t                     mCurrentLoop;
+  int32_t                     mLoopCount;
+  int32_t                     mCurrentLoop;
   bool                        mNeedRender;
   bool                        mDestroyThread;  ///< Whether the thread be destroyed
   bool                        mResourceReady;
index 473080b..db4ddb0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BORDER_VISUAL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -78,27 +78,27 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 public:
 
index 4b6dca6..64ff0b2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_COLOR_VISUAL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -63,12 +63,12 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -87,17 +87,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 private:
   /**
index 9c84cf2..c67ee87 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_GRADIENT_VISUAL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -98,12 +98,12 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -122,17 +122,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
 private:
 
index c693f0b..dcd76f6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_VISUAL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -172,22 +172,22 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  virtual void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
+  void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
 
 protected:
 
@@ -227,27 +227,27 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor ) ;
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform() ;
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::IsResourceReady
    */
-  virtual bool IsResourceReady() const;
+  bool IsResourceReady() const override;
 
 public:
 
@@ -257,7 +257,7 @@ public:
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  virtual void UploadCompleted() override;
+  void UploadCompleted() override;
 
   /**
    * @copydoc TextureUploadObserver::UploadCompleted
@@ -265,8 +265,8 @@ public:
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  virtual void UploadComplete( bool success, int32_t textureId, TextureSet textureSet,
-                               bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied ) override;
+  void UploadComplete( bool success, int32_t textureId, TextureSet textureSet,
+                       bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied ) override;
 
 private:
 
index 511ce49..99ed559 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_MESH_VISUAL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -73,12 +73,12 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -97,17 +97,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
 public:
 
index d10e687..a761628 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_N_PATCH_VISUAL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -96,17 +96,17 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -125,22 +125,22 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor );
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 private:
 
index 6b38bd7..e27239b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PRIMITIVE_VISUAL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -115,17 +115,17 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -144,17 +144,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 private:
 
index 46c6966..f30c459 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SVG_RASTERIZE_THREAD_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -183,7 +183,7 @@ protected:
    * The entry function of the worker thread.
    * It fetches task from the Queue, rasterizes the image and apply to the renderer.
    */
-  virtual void Run();
+  void Run() override;
 
 private:
 
index e516186..8fc2ad8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SVG_VISUAL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -87,17 +87,17 @@ public:  // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -117,22 +117,22 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage
    */
-  virtual void DoSetOffStage( Actor& actor );
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 public:
 
index f1d7e12..6f47e45 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_VISUAL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -128,22 +128,22 @@ public: // from Visual::Base
   /**
    * @copydoc Visual::Base::GetHeightForWidth()
    */
-  virtual float GetHeightForWidth( float width );
+  float GetHeightForWidth( float width ) override;
 
   /**
    * @copydoc Visual::Base::GetNaturalSize()
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap()
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
 protected:
 
@@ -164,22 +164,22 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties()
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage()
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffStage()
    */
-  virtual void DoSetOffStage( Actor& actor );
+  void DoSetOffStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
 private:
   /**
index d63cfa8..eb54b71 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_WIREFRAME_VISUAL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -96,44 +96,44 @@ protected: // from Visual::Base
   /**
    * @copydoc Visual::Base::GetHeightForWidth()
    */
-  virtual float GetHeightForWidth( float width );
+  float GetHeightForWidth( float width ) override;
 
   /**
    * @copydoc Visual::Base::GetNaturalSize()
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  void GetNaturalSize( Vector2& naturalSize ) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap()
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  void DoCreatePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const;
+  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
 
   /**
    * @copydoc Visual::Base::DoSetProperties()
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
+  void DoSetProperties( const Property::Map& propertyMap ) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnStage
    */
-  virtual void DoSetOnStage( Actor& actor );
+  void DoSetOnStage( Actor& actor ) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
    */
-  virtual void OnSetTransform();
+  void OnSetTransform() override;
 
   /**
    * @copydoc Visual::Base::GetVisualObject
    *
    * Overriding as this visual can sometimes act as a proxy to the actual visual, i.e. when using debug rendering.
    */
-  virtual Base& GetVisualObject() override;
+  Base& GetVisualObject() override;
 
 private:
   /**
index 4027521..0cb665c 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 4;
+const unsigned int TOOLKIT_MICRO_VERSION = 5;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index b6e3c76..fabfa6b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.4.4
+Version:    1.4.5
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT