Merge branch 'devel/master' into tizen
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 12 Feb 2019 07:07:57 +0000 (16:07 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Tue, 12 Feb 2019 07:07:57 +0000 (16:07 +0900)
69 files changed:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
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-internal/utc-Dali-Text-Layout.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Shaping.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-ViewModel.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-TextureManager.cpp
automated-tests/src/dali-toolkit-styling/CMakeLists.txt
automated-tests/src/dali-toolkit-third-party/CMakeLists.txt
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/custom-layout-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-singleton-service.cpp
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-Builder.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-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.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-TextureManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
build/tizen/docs/dali.doxy.in
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/devel-api/visuals/animated-vector-image-visual-actions-devel.h
dali-toolkit/devel-api/visuals/image-visual-properties-devel.h
dali-toolkit/internal/helpers/color-conversion.h
dali-toolkit/internal/layouting/layout-controller-impl.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.cpp
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/texture-manager-impl.cpp
dali-toolkit/internal/visuals/texture-manager-impl.h
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/visual-string-constants.cpp
dali-toolkit/internal/visuals/visual-string-constants.h
dali-toolkit/internal/visuals/wireframe/wireframe-visual.h
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 7a71661..746299b 100755 (executable)
@@ -49,6 +49,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
    ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
index 0cc5c2d..80f2113 100644 (file)
@@ -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.
@@ -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,14 +180,17 @@ 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 );
   DALI_TEST_EQUALS( naturalSize, Vector2( 80.f, 20.f ), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   const float height = textVisual.GetHeightForWidth( 40.f );
-  DALI_TEST_EQUALS( height, 40.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  DALI_TEST_EQUALS( height, 38.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   // Test that NPatchVisual is replaced with debug visual
   // TEST_NPATCH_FILE_NAME: image_01.9.jpg
index c87af41..4edcaad 100755 (executable)
@@ -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.
@@ -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.
@@ -559,8 +558,8 @@ int UtcDaliTextControllerSetGetLineSpacingProperty(void)
   // single line, line spacing = 0px
   {
     const float EXPECTED_SPACING = 0.0f;
-    const Vector2 EXPECTED_LAYOUT_SIZE( 326.0f, 19.0f);
-    const Vector3 EXPECTED_NATURAL_SIZE( 326.0f, 20.0f, 0.0f );
+    const Vector2 EXPECTED_LAYOUT_SIZE( 343.0f, 19.0f);
+    const Vector3 EXPECTED_NATURAL_SIZE( 344.0f, 20.0f, 0.0f );
 
     controller->SetText(textSingle);
     controller->Relayout(size);
@@ -578,8 +577,8 @@ int UtcDaliTextControllerSetGetLineSpacingProperty(void)
   // single line, line spacing = 20px
   {
     const float EXPECTED_SPACING = 20.0f;
-    const Vector2 EXPECTED_LAYOUT_SIZE( 326.0f, 19.0f );
-    const Vector3 EXPECTED_NATURAL_SIZE( 326.0f, 40.0f, 0.0f );
+    const Vector2 EXPECTED_LAYOUT_SIZE( 343.0f, 19.0f );
+    const Vector3 EXPECTED_NATURAL_SIZE( 344.0f, 40.0f, 0.0f );
 
     controller->SetText(textSingle);
     controller->Relayout(size);
@@ -598,8 +597,8 @@ int UtcDaliTextControllerSetGetLineSpacingProperty(void)
   // multi-line, line spacing = 0px
   {
     const float EXPECTED_SPACING = 0.0f;
-    const Vector2 EXPECTED_LAYOUT_SIZE( 318.0f, 39.0f );
-    const Vector3 EXPECTED_NATURAL_SIZE( 116.0f, 58.0f, 0.0f );
+    const Vector2 EXPECTED_LAYOUT_SIZE( 333.0f, 39.0f );
+    const Vector3 EXPECTED_NATURAL_SIZE( 120.0f, 58.0f, 0.0f );
 
     controller->SetText(textMulti);
     controller->Relayout(size);
@@ -618,8 +617,8 @@ int UtcDaliTextControllerSetGetLineSpacingProperty(void)
   // multi-line, line spacing = 20px
   {
     const float EXPECTED_SPACING = 20.0f;
-    const Vector2 EXPECTED_LAYOUT_SIZE( 115.0f, 57.0f );
-    const Vector3 EXPECTED_NATURAL_SIZE( 116.0f, 118.0f, 0.0f );
+    const Vector2 EXPECTED_LAYOUT_SIZE( 119.0f, 57.0f );
+    const Vector3 EXPECTED_NATURAL_SIZE( 120.0f, 118.0f, 0.0f );
 
     controller->SetText(textMulti);
     controller->Relayout(size);
@@ -638,8 +637,8 @@ int UtcDaliTextControllerSetGetLineSpacingProperty(void)
   // multi-line, line spacing = 30px
   {
     const float EXPECTED_SPACING = 30.0f;
-    const Vector2 EXPECTED_LAYOUT_SIZE( 115.0f, 117.0f );
-    const Vector3 EXPECTED_NATURAL_SIZE( 116.0f, 148.0f, 0.0f );
+    const Vector2 EXPECTED_LAYOUT_SIZE( 119.0f, 117.0f );
+    const Vector3 EXPECTED_NATURAL_SIZE( 120.0f, 148.0f, 0.0f );
 
     controller->SetText(textMulti);
     controller->Relayout(size);
index 8b9bffd..249c728 100755 (executable)
@@ -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.
@@ -717,7 +717,7 @@ int UtcDaliTextLayoutSmallTextArea02(void)
   Vector<FontDescriptionRun> fontDescriptionRuns;
   fontDescriptionRuns.PushBack( fontDescriptionRun );
   Size textArea(1.f, 1.f);
-  Size layoutSize(80.f, 20.f);
+  Size layoutSize(80.f, 19.f);
   float positions[] = { 1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f };
   struct LineRun line =
   {
@@ -725,7 +725,7 @@ int UtcDaliTextLayoutSmallTextArea02(void)
     { 0u, 11u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -801,7 +801,7 @@ int UtcDaliTextLayoutMultilineText01(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun1 );
   fontDescriptionRuns.PushBack( fontDescriptionRun2 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(95.f, 97.f);
+  Size layoutSize(95.f, 95.f);
   float positions[] =
   {
     1.f, -12.f, 11.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f, -9.f, 51.f,  -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
@@ -816,7 +816,7 @@ int UtcDaliTextLayoutMultilineText01(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -829,7 +829,7 @@ int UtcDaliTextLayoutMultilineText01(void)
     { 12u, 6u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1000,7 +1000,7 @@ int UtcDaliTextLayoutMultilineText02(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun4 );
   fontDescriptionRuns.PushBack( fontDescriptionRun5 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(80.f, 120.f);
+  Size layoutSize(80.f, 114.f);
   float positions[] =
   {
     1.f, -12.f, 11.f,  -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f,  -0.f, 40.f,  -9.f, 51.f,  -9.f, 61.f,  -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
@@ -1016,7 +1016,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1029,7 +1029,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 12u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1042,7 +1042,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 22u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1055,7 +1055,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 28u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1068,7 +1068,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 38u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1081,7 +1081,7 @@ int UtcDaliTextLayoutMultilineText02(void)
     { 50u, 5u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1150,7 +1150,7 @@ int UtcDaliTextLayoutMultilineText03(void)
   Vector<FontDescriptionRun> fontDescriptionRuns;
   fontDescriptionRuns.PushBack( fontDescriptionRun );
   Size textArea(100.f, 300.f);
-  Size layoutSize(96.f, 60.f);
+  Size layoutSize(96.f, 57.f);
   float positions[] =
   {
     1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f,  -9.f, 36.f,  -9.f, 47.f, -9.f, 57.f, -9.f, 63.f, -13.f, 66.f, -13.f, 75.f, -13.f, 84.f,  -9.f,
@@ -1163,7 +1163,7 @@ int UtcDaliTextLayoutMultilineText03(void)
     { 0u, 12u },
     93.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1176,7 +1176,7 @@ int UtcDaliTextLayoutMultilineText03(void)
     { 12u, 12u },
     96.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1189,7 +1189,7 @@ int UtcDaliTextLayoutMultilineText03(void)
     { 24u, 5u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1254,7 +1254,7 @@ int UtcDaliTextLayoutMultilineText04(void)
   Vector<FontDescriptionRun> fontDescriptionRuns;
   fontDescriptionRuns.PushBack( fontDescriptionRun );
   Size textArea(100.f, 300.f);
-  Size layoutSize(83.f, 40.f);
+  Size layoutSize(83.f, 38.f);
   float positions[] =
   {
     1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -2.f, 82.f, -12.f
@@ -1265,7 +1265,7 @@ int UtcDaliTextLayoutMultilineText04(void)
     { 0u, 13u },
     83.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     false,
@@ -1277,7 +1277,7 @@ int UtcDaliTextLayoutMultilineText04(void)
     { 13u, 0u },
     0.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1368,19 +1368,19 @@ int UtcDaliTextLayoutMultilineText05(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun2 );
   fontDescriptionRuns.PushBack( fontDescriptionRun3 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(88.f, 53.f);
+  Size layoutSize(89.f, 51.f);
   float positions[] =
   {
-    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -14.f, 59.f, -9.f, 69.f, -9.f, 75.f, -13.f, 78.f, -13.f, 87.f, -0.f,
+    1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -14.f, 60.f, -9.f, 70.f, -9.f, 76.f, -13.f, 79.f, -13.f, 88.f, -0.f,
     0.f, -13.f,  9.f, -9.f, 18.f,  -9.f, 30.f,  -9.f, 39.f, -2.f
   };
   struct LineRun line0 =
   {
     { 0u, 12u },
     { 0u, 12u },
-    88.f,
+    89.f,
     25.f,
-    -8.f,
+    -7.f,
     4.f,
     0.f,
     0.f,
@@ -1393,7 +1393,7 @@ int UtcDaliTextLayoutMultilineText05(void)
     { 12u, 5u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1683,7 +1683,7 @@ int UtcDaliTextUpdateLayout01(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun16 );
   fontDescriptionRuns.PushBack( fontDescriptionRun17 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(92.f, 380.f);
+  Size layoutSize(92.f, 361.f);
   float positions[] =
   {
     1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
@@ -1712,7 +1712,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1725,7 +1725,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 12u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1738,7 +1738,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 22u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1751,7 +1751,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 28u, 20u },
     92.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1764,7 +1764,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 48u, 11u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1777,7 +1777,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 59u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1790,7 +1790,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 64u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1803,7 +1803,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 74u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     1.f,
     0.f,
@@ -1816,7 +1816,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 86u, 6u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1829,7 +1829,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 92u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1842,7 +1842,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 104u, 19u },
     90.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1855,7 +1855,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 123u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1868,7 +1868,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 128u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1881,7 +1881,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 140u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1894,7 +1894,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 150u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1907,7 +1907,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 156u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1920,7 +1920,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 166u, 12u },
     79.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -1933,7 +1933,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 178u, 14u },
     55.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -1946,7 +1946,7 @@ int UtcDaliTextUpdateLayout01(void)
     { 192u, 0u },
     0.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2258,7 +2258,7 @@ int UtcDaliTextUpdateLayout02(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun16 );
   fontDescriptionRuns.PushBack( fontDescriptionRun17 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(92.f, 380.f);
+  Size layoutSize(92.f, 361.f);
   float positions[] =
   {
     1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
@@ -2287,7 +2287,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2300,7 +2300,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 12u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2313,7 +2313,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 22u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2326,7 +2326,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 28u, 20u },
     92.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2339,7 +2339,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 48u, 11u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2352,7 +2352,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 59u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2365,7 +2365,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 64u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2378,7 +2378,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 74u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     1.f,
     0.f,
@@ -2391,7 +2391,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 86u, 6u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2404,7 +2404,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 92u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2417,7 +2417,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 104u, 19u },
     90.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2430,7 +2430,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 123u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2443,7 +2443,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 128u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2456,7 +2456,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 140u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2469,7 +2469,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 150u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2482,7 +2482,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 156u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2495,7 +2495,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 166u, 12u },
     79.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2508,7 +2508,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 178u, 14u },
     55.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2521,7 +2521,7 @@ int UtcDaliTextUpdateLayout02(void)
     { 192u, 0u },
     0.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2833,7 +2833,7 @@ int UtcDaliTextUpdateLayout03(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun16 );
   fontDescriptionRuns.PushBack( fontDescriptionRun17 );
   Size textArea(100.f, 300.f);
-  Size layoutSize(92.f, 380.f);
+  Size layoutSize(92.f, 361.f);
   float positions[] =
   {
     1.f, -12.f, 11.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 51.f, -9.f, 61.f, -9.f, 67.f, -13.f, 70.f, -13.f, 79.f, -0.f,
@@ -2862,7 +2862,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2875,7 +2875,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 12u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2888,7 +2888,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 22u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2901,7 +2901,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 28u, 20u },
     92.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2914,7 +2914,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 48u, 11u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2927,7 +2927,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 59u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2940,7 +2940,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 64u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2953,7 +2953,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 74u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     1.f,
     0.f,
@@ -2966,7 +2966,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 86u, 6u },
     43.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -2979,7 +2979,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 92u, 12u },
     78.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -2992,7 +2992,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 104u, 19u },
     90.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3005,7 +3005,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 123u, 5u },
     31.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3018,7 +3018,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 128u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3031,7 +3031,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 140u, 10u },
     76.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3044,7 +3044,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 150u, 6u },
     34.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3057,7 +3057,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 156u, 10u },
     67.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3070,7 +3070,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 166u, 12u },
     79.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3083,7 +3083,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 178u, 14u },
     55.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3096,7 +3096,7 @@ int UtcDaliTextUpdateLayout03(void)
     { 192u, 0u },
     0.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3188,7 +3188,7 @@ int UtcDaliTextLayoutEllipsis01(void)
     { 0u, 13u },
     93.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3204,7 +3204,7 @@ int UtcDaliTextLayoutEllipsis01(void)
   };
 
   Size textArea( 100.f, 50.f );
-  Size layoutSize( 100.f, 20.f );
+  Size layoutSize( 100.f, 19.f );
 
   LayoutTextData data =
   {
@@ -3265,7 +3265,7 @@ int UtcDaliTextLayoutEllipsis02(void)
     { 0u, 12u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3278,7 +3278,7 @@ int UtcDaliTextLayoutEllipsis02(void)
     { 12u, 12u },
     93.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3296,7 +3296,7 @@ int UtcDaliTextLayoutEllipsis02(void)
   };
 
   Size textArea( 100.f, 50.f );
-  Size layoutSize( 100.f, 40.f );
+  Size layoutSize( 100.f, 38.f );
 
   LayoutTextData data =
   {
@@ -3423,7 +3423,7 @@ int UtcDaliTextLayoutEllipsis03(void)
     { 0u, 16u },
     95.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
@@ -3439,7 +3439,7 @@ int UtcDaliTextLayoutEllipsis03(void)
   };
 
   Size textArea( 100.f, 50.f );
-  Size layoutSize( 100.f, 20.f );
+  Size layoutSize( 100.f, 19.f );
 
   LayoutTextData data =
   {
@@ -3566,7 +3566,7 @@ int UtcDaliTextLayoutEllipsis04(void)
     { 0u, 16u },
     96.f,
     15.f,
-    -5.f,
+    -4.f,
     3.f,
     0.f,
     0.f,
@@ -3579,7 +3579,7 @@ int UtcDaliTextLayoutEllipsis04(void)
     { 16u, 18u },
     97.f,
     15.f,
-    -5.f,
+    -4.f,
     4.f,
     0.f,
     0.f,
@@ -3597,7 +3597,7 @@ int UtcDaliTextLayoutEllipsis04(void)
   };
 
   Size textArea( 100.f, 50.f );
-  Size layoutSize( 100.f, 40.f );
+  Size layoutSize( 100.f, 38.f );
 
   LayoutTextData data =
   {
@@ -3656,12 +3656,12 @@ int UtcDaliTextLayoutEllipsis05(void)
     { 0u, 11u },
     80.f,
     15.f,
-    -5.f,
+    -4.f,
     0.f,
     0.f,
     0.f,
     false,
-    true
+    false
   };
   Vector<LineRun> lines;
   lines.PushBack( line01 );
@@ -3672,7 +3672,7 @@ int UtcDaliTextLayoutEllipsis05(void)
   };
 
   Size textArea( 100.f, 19.f );
-  Size layoutSize( 100.f, 20.f );
+  Size layoutSize( 80.f, 19.f );
 
   LayoutTextData data =
   {
index b5bf653..65a56da 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.
@@ -328,18 +328,18 @@ int UtcDaliTextShape(void)
 
   struct GlyphInfoData glyphs04[] =
   {
-    { 2u, 160u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 123u, 0.f, 0.f, 0.f, 0.f,  9.f, 0.f },
-    { 2u, 153u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 160u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 150u, 0.f, 0.f, 0.f, 0.f, 14.f, 0.f },
-    { 2u, 153u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 160u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 151u, 0.f, 0.f, 0.f, 0.f, 12.f, 0.f },
-    { 2u, 153u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 160u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
-    { 2u, 147u, 0.f, 0.f, 0.f, 0.f,  9.f, 0.f },
-    { 2u, 153u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
+    { 2u, 1733u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1693u, 0.f, 0.f, 0.f, 0.f, 13.f, 0.f },
+    { 2u, 1725u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1733u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1721u, 0.f, 0.f, 0.f, 0.f, 20.f, 0.f },
+    { 2u, 1725u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1733u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1722u, 0.f, 0.f, 0.f, 0.f, 18.f, 0.f },
+    { 2u, 1725u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1733u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
+    { 2u, 1718u, 0.f, 0.f, 0.f, 0.f, 14.f, 0.f },
+    { 2u, 1725u, 0.f, 0.f, 0.f, 0.f,  8.f, 0.f },
   };
 
   CharacterIndex characterIndices04[] = { 0u, 0u, 0u, 2u, 2u, 2u, 4u, 4u, 4u, 6u, 6u, 6u };
@@ -382,7 +382,7 @@ int UtcDaliTextShape(void)
     { 1u,  3u, 0.f, 0.f, 0.f, 0.f,  5.f, 0.f },
     { 1u, 71u, 0.f, 0.f, 0.f, 0.f, 10.f, 0.f },
     { 1u, 72u, 0.f, 0.f, 0.f, 0.f,  9.f, 0.f },
-    { 1u, 5034u, 0.f, 0.f, 0.f, 0.f, 10.f, 0.f },
+    { 1u, 5039u, 0.f, 0.f, 0.f, 0.f, 10.f, 0.f },
     { 1u, 81u, 0.f, 0.f, 0.f, 0.f, 10.f, 0.f },
     { 1u, 76u, 0.f, 0.f, 0.f, 0.f,  4.f, 0.f },
     { 1u, 72u, 0.f, 0.f, 0.f, 0.f,  9.f, 0.f },
@@ -551,15 +551,15 @@ int UtcDaliTextSoftwareStyling(void)
 
   struct GlyphInfoData glyphs01[] =
   {
-    { 2u, 14750u, 0.f, 0.f, 0.f, 0.f, 16.f, 0.f, true, true },
-    { 2u, 9802u, 0.f, 0.f, 0.f, 0.f,  16.f, 0.f, true, true },
-    { 2u, 12811u, 0.f, 0.f, 0.f, 0.f,  16.f, 0.f, true, true },
+    { 2u, 4857u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, true, false },
+    { 2u, 7316u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, true, false },
+    { 2u, 4364u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, true, false },
   };
   struct GlyphInfoData glyphs02[] =
   {
-    { 2u, 14750u, 0.f, 0.f, 0.f, 0.f, 16.f, 0.f, false, false },
-    { 2u, 9802u, 0.f, 0.f, 0.f, 0.f,  16.f, 0.f, false, true },
-    { 2u, 12811u, 0.f, 0.f, 0.f, 0.f,  16.f, 0.f, true, false },
+    { 2u, 4857u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, false, false },
+    { 2u, 7316u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, false, false },
+    { 2u, 4364u, 0.f, 0.f, 0.f, 0.f, 15.f, 0.f, true,  false },
   };
 
   CharacterIndex characterIndices[] = { 0u, 1u, 2u };
@@ -691,4 +691,4 @@ int UtcDaliTextSoftwareStyling(void)
 
   tet_result(TET_PASS);
   END_TEST;
-}
\ No newline at end of file
+}
index 49d36e0..35105d1 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.
@@ -49,14 +49,14 @@ const char* LOREM_IPSUM = "Lorem ipsum dolor sit amet, aeque definiebas ea mei,
   "Aliquip sanctůs delicáta quí ěá, et natum aliquam est?\n"
   "Asšúm sapěret usu ůť.\n"
   "Síť ut apeirián laboramúš percipitur, sůas hařum ín éos?\n";
-const Vector2 LOREM_SCROLL_POSITION( 0.f, -208.f );
-const Length LOREM_NUMBER_OF_LINES = 32u;
+const Vector2 LOREM_SCROLL_POSITION( 0.f, -265.f );
+const Length LOREM_NUMBER_OF_LINES = 35u;
 const Length LOREM_NUMBER_OF_LINES_ELIDED = 21u;
 const Length LOREM_NUMBER_OF_GLYPHS = 632;
-const Length LOREM_NUMBER_OF_GLYPHS_ELIDED = 397u;
+const Length LOREM_NUMBER_OF_GLYPHS_ELIDED = 395u;
 
 // The expected layout size for UtcDaliTextViewModelGetLayoutSize
-const Size LAYOUT_SIZE( 190.f, 48.f );
+const Size LAYOUT_SIZE( 197.f, 45.f );
 
 // The expected color indices for UtcDaliTextViewModelGetColors
 const ColorIndex COLOR_INDICES[] = { 0u, 0u, 0u, 0u, 0u, 0u, 1u, 1u, 1u, 2u, 2u, 2u, 2u, 2u, 1u, 1u, 1u, 1u, 1u, 3u, 1u, 1u, 1u, 0u, 0u, 0u, 0u };
@@ -583,13 +583,13 @@ int UtcDaliTextViewModelElideText02(void)
   Size textSize00( 100.f, 100.f );
 
   Size textSize01( 80.f, 100.f );
-  float positions01[] = { 0.f, 9.f, 17.f, 27.f, 35.f, 37.f, 46.f, 56.f };
+  float positions01[] = { 0.f, 8.f, 16.f, 26.f, 33.f, 41.f, 45.f, 54.f, 64.0f };
 
   Size textSize02( 80.f, 100.f );
-  float positions02[] = { 72.f, 63.f, 54.f, 50.f, 43.f, 38.f, 30.f, 11.f };
+  float positions02[] = { 72.f, 63.f, 54.f, 50.f, 43.f, 38.f, 30.f, 9.0f };
 
   Size textSize03( 80.f, 100.f );
-  float positions03[] = { 77.f, 76.f, 71.f, 62.f, 59.f, 52.f, 47.f, 42.f, 39.f, 35.f, 32.f, 13.f };
+  float positions03[] = { 78.f, 73.f, 70.f, 65.f, 57.f, 55.f, 51.f, 50.f, 45.f, 35.f, 32.f, 24.f, 7.f };
 
   Size textSize04( 80.f, 10.f );
   float positions04[] = { 2.f };
@@ -609,7 +609,7 @@ int UtcDaliTextViewModelElideText02(void)
       "<font family='TizenSans'>Lorem ipsum dolor sit amet, aeque definiebas ea mei, posse iracundia ne cum.</font>",
       textSize01,
       5u,
-      42u,
+      37u,
       positions01
     },
     {
@@ -625,7 +625,7 @@ int UtcDaliTextViewModelElideText02(void)
       "<font family='TizenSansArabic'>عل النفط ديسمبر الإمداد بال, بين وترك شعار هو. لمّ من المبرمة النفط بالسيطرة, أم يتم تحرّك وبغطاء, عدم في لإعادة وإقامة رجوعهم.</font>",
       textSize03,
       5u,
-      79u,
+      74u,
       positions03
     },
     {
index d72bf17..823c7bb 100644 (file)
 
 using namespace Dali::Toolkit::Internal;
 
+
+void utc_dali_toolkit_texture_manager_startup(void)
+{
+  setenv( "LOG_TEXTURE_MANAGER", "3", 1 );
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_toolkit_texture_manager_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
 class TestObserver : public Dali::Toolkit::TextureUploadObserver
 {
 public:
index 6b38451..2366711 100644 (file)
@@ -37,6 +37,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-virtual-keyboard.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-animation-data.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-button.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-application.cpp
index e9ff79a..a5fde09 100644 (file)
@@ -26,6 +26,7 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
    ../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
+   ../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
    ../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
    ../dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
index bd9848f..1ef55f9 100755 (executable)
@@ -104,6 +104,7 @@ LIST(APPEND TC_SOURCES
   dali-toolkit-test-utils/toolkit-web-engine.cpp
   dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp
   dali-toolkit-test-utils/dali-test-suite-utils.cpp
+  dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
   dali-toolkit-test-utils/dummy-control.cpp
   dali-toolkit-test-utils/layout-utils.cpp
   dali-toolkit-test-utils/mesh-builder.cpp
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
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
new file mode 100644 (file)
index 0000000..94c9530
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ * 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-toolkit-test-suite-utils.h"
+
+
+std::ostream& operator<<( std::ostream& ostream, Dali::Toolkit::Visual::ResourceStatus status )
+{
+  switch(status)
+  {
+    case Dali::Toolkit::Visual::ResourceStatus::PREPARING:
+    {
+      ostream << "PREPARING";
+      break;
+    }
+    case Dali::Toolkit::Visual::ResourceStatus::READY:
+    {
+      ostream << "READY";
+      break;
+    }
+    case Dali::Toolkit::Visual::ResourceStatus::FAILED:
+    {
+      ostream << "FAILED";
+      break;
+    }
+  }
+  return ostream;
+}
index 32dac4b..013d2c6 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_TEST_SUITE_UTILS_H__
 
 /*
- * Copyright (c) 2014 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.
  *
  */
 
+#include <iostream>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+
+// Put any toolkit specific operators for DALI_TEST_CHECK template here, before dali-test-suite-utils.h.
+
+std::ostream& operator<<( std::ostream& ostream, Dali::Toolkit::Visual::ResourceStatus status );
+
 // INTERNAL INCLUDES
 
 #include <dali-test-suite-utils.h>
index 5b8a324..02f3d8f 100644 (file)
@@ -77,7 +77,7 @@ bool EventThreadCallback::WaitingForTrigger()
   struct timespec now;
   clock_gettime( CLOCK_REALTIME, &now );
   if( now.tv_nsec < 999900000 ) // 999, 900, 000
-    now.tv_nsec += 100000;
+    now.tv_nsec += 1000;
   else
   {
     now.tv_sec += 1;
@@ -124,6 +124,10 @@ bool WaitForEventThreadTrigger( int triggerCount, int timeoutInSeconds )
           Dali::CallbackBase::Execute( *callback );
           triggerCount--;
         }
+        if( triggerCount <= 0 )
+        {
+          break;
+        }
       }
     }
     clock_gettime( CLOCK_REALTIME, &now );
index e8c2e8d..7ba5ca4 100644 (file)
@@ -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.
@@ -21,6 +21,7 @@
 #include <dali/public-api/object/base-object.h>
 #include <dali/devel-api/common/map-wrapper.h>
 #include <dali/public-api/signals/dali-signal.h>
+#include <dali/integration-api/processor-interface.h>
 
 namespace Dali
 {
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..bda987d 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 );
@@ -513,6 +543,10 @@ int UtcDaliAnimatedVectorImageVisualPlayRange(void)
   Renderer renderer = actor.GetRendererAt( 0u );
   DALI_TEST_CHECK( renderer );
 
+  Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  Property::Value* value = map.Find( DevelImageVisual::Property::PLAY_RANGE );
+  DALI_TEST_EQUALS( value->Get< Vector2 >(), playRange, TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -557,3 +591,114 @@ int UtcDaliAnimatedVectorImageVisualAnimationFinishedSignal(void)
 
   END_TEST;
 }
+
+int UtcDaliAnimatedVectorImageVisualJumpToCurrentProgress(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualJumpToCurrentProgress" );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME  );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  Vector2 controlSize( 20.f, 30.f );
+  actor.SetSize( controlSize );
+
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO, 0.6f );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  Property::Value* value = map.Find( DevelImageVisual::Property::CURRENT_PROGRESS );
+  DALI_TEST_EQUALS( value->Get< float >(), 0.6f, TEST_LOCATION );
+
+  Vector2 playRange( 0.0f, 0.4f );
+
+  Property::Map attributes;
+  attributes.Add( DevelImageVisual::Property::PLAY_RANGE, playRange );
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::UPDATE_PROPERTY, attributes );
+
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO, 0.8f );
+
+  application.SendNotification();
+  application.Render();
+
+  map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  value = map.Find( DevelImageVisual::Property::CURRENT_PROGRESS );
+  DALI_TEST_EQUALS( value->Get< float >(), 0.4f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliAnimatedVectorImageVisualUpdateProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualJumpToCurrentProgress" );
+
+  Vector2 playRange( 0.2f, 0.8f );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME  )
+             .Add( DevelImageVisual::Property::LOOP_COUNT, 3  )
+             .Add( DevelImageVisual::Property::PLAY_RANGE, playRange  );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  Vector2 controlSize( 20.f, 30.f );
+  actor.SetSize( controlSize );
+
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  Property::Value* value = map.Find( DevelImageVisual::Property::LOOP_COUNT );
+  DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
+
+  value = map.Find( DevelImageVisual::Property::PLAY_RANGE );
+  DALI_TEST_EQUALS( value->Get< Vector2 >(), playRange, TEST_LOCATION );
+
+  Vector2 newPlayRange( 0.4f, 1.0f );
+
+  Property::Map attributes;
+  attributes.Add( DevelImageVisual::Property::PLAY_RANGE, newPlayRange );
+  attributes.Add( DevelImageVisual::Property::LOOP_COUNT, 5 );
+
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::UPDATE_PROPERTY, attributes );
+
+  application.SendNotification();
+  application.Render();
+
+  map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  value = map.Find( DevelImageVisual::Property::LOOP_COUNT );
+  DALI_TEST_EQUALS( value->Get< int >(), 5, TEST_LOCATION );
+
+  value = map.Find( DevelImageVisual::Property::PLAY_RANGE );
+  DALI_TEST_EQUALS( value->Get< Vector2 >(), newPlayRange, TEST_LOCATION );
+
+  END_TEST;
+}
index 77439d4..4d8bfe0 100644 (file)
@@ -28,6 +28,7 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <test-button.h>
 #include <test-animation-data.h>
+#include <dummy-control.h>
 
 
 #define STRINGIFY(A)#A
@@ -1791,6 +1792,43 @@ int UtcDaliBuilderBuilderControl(void)
   END_TEST;
 }
 
+int UtcDaliBuilderCustomControl(void)
+{
+  ToolkitTestApplication application;
+
+  std::string json(
+    "{"
+       "\"stage\":"
+       "[{"
+         "\"type\": \"DummyControl\","
+         "\"name\": \"I can haz custom Control\""
+      "}]"
+    "}"
+  );
+
+  Actor rootActor = Actor::New();
+  Stage::GetCurrent().Add( rootActor );
+
+  Builder builder = Builder::New();
+  builder.LoadFromString( json );
+  builder.AddActors( rootActor );
+
+  application.SendNotification();
+  application.Render();
+
+  Actor customControl = rootActor.FindChildByName( "I can haz custom Control" );
+
+  // Test that we have the correct type of custom control
+  DummyControl dummyControl = DummyControl::DownCast( customControl );
+  DALI_TEST_CHECK( dummyControl );
+  if( dummyControl )
+  {
+    DALI_TEST_CHECK( typeid(dummyControl.GetImplementation()) == typeid(DummyControlImpl) );
+  }
+
+  END_TEST;
+}
+
 int UtcDaliBuilderActionsWithParams(void)
 {
   ToolkitTestApplication application;
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 29370b7..7d1ea16 100644 (file)
@@ -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.
@@ -1841,6 +1841,8 @@ int UtcDaliImageViewCustomShader(void)
     application.SendNotification();
     application.Render();
 
+    DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
     Renderer renderer = imageView.GetRendererAt( 0 );
     Shader shader2 = renderer.GetShader();
     Property::Value value = shader2.GetProperty( Shader::Property::PROGRAM );
@@ -1873,6 +1875,7 @@ int UtcDaliImageViewCustomShader(void)
 
     application.SendNotification();
     application.Render();
+    DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
     Renderer renderer = imageView.GetRendererAt( 0 );
     Shader shader2 = renderer.GetShader();
@@ -1910,6 +1913,7 @@ int UtcDaliImageViewCustomShader(void)
 
     application.SendNotification();
     application.Render();
+    DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
     Renderer renderer = imageView.GetRendererAt( 0 );
     Shader shader2 = renderer.GetShader();
@@ -1947,6 +1951,7 @@ int UtcDaliImageViewCustomShader(void)
 
     application.SendNotification();
     application.Render();
+    DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
     Renderer renderer = imageView.GetRendererAt( 0 );
     Shader shader2 = renderer.GetShader();
@@ -1963,3 +1968,60 @@ int UtcDaliImageViewCustomShader(void)
 
   END_TEST;
 }
+
+
+namespace
+{
+static int gFailCounter = 0;
+const int MAX_RETRIES(3);
+
+void ReloadImage(ImageView imageView)
+{
+  Property::Map imageImmediateLoadingMap;
+  imageImmediateLoadingMap[ ImageVisual::Property::URL ] = "Non-existant-image.jpg";
+  imageImmediateLoadingMap[ ImageVisual::Property::LOAD_POLICY ] =  ImageVisual::LoadPolicy::IMMEDIATE;
+
+  tet_infoline("Immediate load an image");
+  imageView.SetProperty( ImageView::Property::IMAGE, imageImmediateLoadingMap );
+}
+
+void ResourceFailedReload( Control control )
+{
+  gFailCounter++;
+  if( gFailCounter < MAX_RETRIES )
+  {
+    ReloadImage(ImageView::DownCast(control));
+  }
+}
+}
+
+int UtcDaliImageViewReloadFailedOnResourceReadySignal(void)
+{
+  tet_infoline("Test reloading failed image from within signal handler.");
+
+  ToolkitTestApplication application;
+
+  gFailCounter = 0;
+
+  ImageView imageView = ImageView::New();
+  imageView.ResourceReadySignal().Connect( &ResourceFailedReload );
+  DALI_TEST_EQUALS( gFailCounter, 0, TEST_LOCATION );
+  ReloadImage(imageView);
+
+  // loading started, this waits for the loader thread to complete
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+  application.SendNotification();
+
+  DALI_TEST_EQUALS( gFailCounter, 1, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+  application.SendNotification();
+
+  DALI_TEST_EQUALS( gFailCounter, 2, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+  application.SendNotification();
+  DALI_TEST_EQUALS( gFailCounter, 3, TEST_LOCATION );
+
+  END_TEST;
+}
index 90dd9e7..a15ecf6 100644 (file)
@@ -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.
@@ -16,6 +16,7 @@
 
 #include <iostream>
 #include <stdlib.h>
+#include <vector>
 #include <dali-toolkit-test-suite-utils.h>
 #include <toolkit-timer.h>
 #include <toolkit-event-thread-callback.h>
@@ -43,6 +44,7 @@ void dali_image_visual_cleanup(void)
 namespace
 {
 const char* TEST_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR  "/gallery-small-1.jpg";
+const char* TEST_BROKEN_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR  "/a-random-nonimage.jpg";
 const char* TEST_LARGE_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR "/tbcol.png";
 const char* TEST_SMALL_IMAGE_FILE_NAME = TEST_RESOURCE_DIR "/icon-edit.png";
 const char* TEST_REMOTE_IMAGE_FILE_NAME = "https://www.tizen.org/sites/all/themes/tizen_theme/logo.png";
@@ -53,10 +55,15 @@ const char* TEST_ROTATED_IMAGE =  TEST_RESOURCE_DIR  "/keyboard-Landscape.jpg";
 
 
 bool gResourceReadySignalFired = false;
-
+std::vector<int> gReadyIds = {};
 void ResourceReadySignal( Control control )
 {
   gResourceReadySignalFired = true;
+  gReadyIds.push_back(control.GetId());
+}
+void ClearReadyIds()
+{
+  gReadyIds.clear();
 }
 
 Actor CreateActorWithImageVisual(const Property::Map& map)
@@ -2178,3 +2185,97 @@ int UtcDaliImageVisualCustomShader(void)
 
   END_TEST;
 }
+
+
+void ResourceReadyLoadNext( Control control )
+{
+  static int callNumber = 0;
+
+  gResourceReadySignalFired = true;
+  gReadyIds.push_back(control.GetId());
+
+  if( callNumber == 0 )
+  {
+    DALI_TEST_EQUALS( control.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL), Toolkit::Visual::ResourceStatus::FAILED, TEST_LOCATION );
+
+    tet_infoline( "Create visual with loaded image from within the signal handler" );
+    VisualFactory factory = VisualFactory::Get();
+    Visual::Base imageVisual = factory.CreateVisual( TEST_IMAGE_FILE_NAME, ImageDimensions{20,30} );
+
+    Impl::DummyControl& controlImpl = static_cast<Impl::DummyControl&>(control.GetImplementation());
+    controlImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual ); // This should trigger another signal.
+    callNumber = 1;
+  }
+  else
+  {
+    tet_infoline( "3rd signal called" );
+    DALI_TEST_CHECK(true);
+  }
+}
+
+int UtcDaliImageVisualLoadReady01(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliImageVisualLoadReady01");
+  tet_infoline( "First part:  Load an image visual for one resource, then another image visual for a second resource.");
+  tet_infoline( "Second part, In the ready signal for the second image visual, add a 3rd visual with the first URL" );
+  tet_infoline( "Should get a ready signal for all three visuals");
+
+  ClearReadyIds();
+
+  tet_infoline( "Create a control and connect to resource ready signal" );
+  DummyControl actor = DummyControl::New(true);
+  int actor1Id = actor.GetId();
+  actor.ResourceReadySignal().Connect( &ResourceReadySignal);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  actor.SetSize(200.f, 200.f);
+  Stage::GetCurrent().Add(actor);
+
+  tet_infoline( "Create visual with IMMEDIATE load policy" );
+  Visual::Base imageVisual1 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
+
+  tet_infoline( "Registering visual allows control to get a signal once loaded even if visual not enabled( staged )" );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual1 );
+
+
+  tet_infoline( "Allow image time to load" );
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+  application.SendNotification();
+  application.Render();
+
+  tet_infoline( "Testing texture is loaded and resource ready signal fired" );
+  DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( gReadyIds[0], actor1Id, TEST_LOCATION );
+
+
+  tet_infoline( "Original control correctly signalled, now testing failing image" );
+
+  gResourceReadySignalFired = false; // Reset signal check ready for testing next Control
+  ClearReadyIds();
+
+  Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_BROKEN_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
+
+  DummyControl actor2 = DummyControl::New(true);
+  int actor2Id = actor2.GetId();
+  Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor2.GetImplementation());
+  actor2.ResourceReadySignal().Connect( &ResourceReadyLoadNext);
+
+  tet_infoline( "Registering visual this should trigger the ready signal when the image fails to load" );
+  dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
+
+  actor2.SetSize(200.f, 200.f);
+  Stage::GetCurrent().Add(actor2);
+
+  tet_infoline( "Wait for loading thread to finish");
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( gReadyIds[0], actor2Id, TEST_LOCATION);
+
+  tet_infoline( "Check for 3rd signal");
+  application.SendNotification();
+  DALI_TEST_EQUALS( gReadyIds.size(), 2, TEST_LOCATION );
+  DALI_TEST_EQUALS( gReadyIds[1], actor2Id, TEST_LOCATION);
+
+  END_TEST;
+}
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 89a95ba..72370db 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.
@@ -26,7 +26,6 @@ using namespace Dali::Toolkit;
 
 namespace
 {
-
 } // namespace
 
 
@@ -152,6 +151,3 @@ int UtcDaliTextureManagerRemoveN(void)
 
   END_TEST;
 }
-
-
-
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 4fcf095..c895b4f 100755 (executable)
@@ -362,12 +362,17 @@ ALIASES += SINCE_1_3_5="@since 1.3.5"
 ALIASES += SINCE_1_3_9="@since 1.3.9"
 ALIASES += SINCE_1_3_15="@since 1.3.15"
 
+#Extra tags for Tizen 5.5
+ALIASES += SINCE_1_3_31="@since 1.3.31"
+
 ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
 ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
 ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 1.2.8"
 ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 1.2.10"
 ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
 ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 1.3"
+ALIASES += DEPRECATED_1_3_39="@deprecated Deprecated since 1.3.39"
+ALIASES += DEPRECATED_1_3_51="@deprecated Deprecated since 1.3.51"
 ALIASES += DEPRECATED_1_4="@deprecated Deprecated since 1.4"
 
 ALIASES += PLATFORM=""
@@ -386,7 +391,7 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += SINCE_1_1="\par Since:\n 3.0, DALi version 1.1"
 #ALIASES += SINCE_1_2="\par Since:\n 4.0, DALi version 1.2"
 #ALIASES += SINCE_1_3="\par Since:\n 5.0, DALi version 1.3"
-#ALIASES += SINCE_1_4="\par Since:\n 6.0, DALi version 1.4"
+#ALIASES += SINCE_1_4="\par Since:\n 5.5, DALi version 1.4"
 
 ## Extra tags for Tizen 3.0
 #ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
@@ -402,6 +407,9 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += SINCE_1_3_9="\par Since:\n 4.0, DALi version 1.3.9"
 #ALIASES += SINCE_1_3_15="\par Since:\n 4.0, DALi version 1.3.15"
 
+#Extra tags for Tizen 5.5
+#ALIASES += SINCE_1_3_31="\par Since:\n 5.5, DALi version 1.3.31"
+
 ## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
 ## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
 #ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 3.0, DALi version 1.0"
@@ -410,7 +418,9 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 3.0, DALi version 1.2.10"
 #ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 4.0, DALi version 1.2"
 #ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 5.0, DALi version 1.3"
-#ALIASES += DEPRECATED_1_4="@deprecated Deprecated since 6.0, DALi version 1.4"
+#ALIASES += DEPRECATED_1_3_39="@deprecated Deprecated since 5.5, DALi version 1.3.39"
+#ALIASES += DEPRECATED_1_3_51="@deprecated Deprecated since 5.5, DALi version 1.3.51"
+#ALIASES += DEPRECATED_1_4="@deprecated Deprecated since 5.5, DALi version 1.4"
 
 #ALIASES += PLATFORM="@platform"
 #ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
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 1f05bd7..92d4e8e 100644 (file)
@@ -37,9 +37,11 @@ namespace Action
  */
 enum Type
 {
-  PLAY,        ///< Play the animated vector image.
-  PAUSE,       ///< Pause the animated vector image.
-  STOP         ///< Stop the animated vector image. This is also Default playback mode.
+  PLAY,            ///< Play the animated vector image.
+  PAUSE,           ///< Pause the animated vector image.
+  STOP,            ///< Stop the animated vector image. This is also Default playback mode.
+  JUMP_TO,         ///< Jump to the specified frame. Property::FLOAT value should be passed.
+  UPDATE_PROPERTY  ///< Update the properties of the animated vector image.
 };
 
 } // namespace Action
index 2ae2726..d48eea8 100644 (file)
@@ -99,8 +99,14 @@ enum Type
    * @details Name "playState", type PlayState (Property::INTEGER)
    * @note This property is read-only.
    */
-  PLAY_STATE = ORIENTATION_CORRECTION + 5
+  PLAY_STATE = ORIENTATION_CORRECTION + 5,
 
+  /**
+   * @brief The animation progress the AnimatedVectorImageVisual will use.
+   * @details Name "currentProgress", Type Property::FLOAT, between [0, 1] or between the play range if specified
+   * @note This property is read-only.
+   */
+  CURRENT_PROGRESS = ORIENTATION_CORRECTION + 6
 };
 
 } //namespace Property
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 8f78c32..3606dd6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_LAYOUT_CONTROLLER_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.
@@ -18,7 +18,7 @@
  */
 #include <list>
 #include <dali/public-api/object/base-object.h>
-#include <dali/integration-api/core.h>
+#include <dali/integration-api/processor-interface.h>
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/devel-api/layouting/layout-controller.h>
 #include <dali-toolkit/devel-api/layouting/layout-item-impl.h>
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..886485b 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
 {
@@ -46,9 +45,17 @@ namespace Internal
 namespace
 {
 
-const Dali::Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
 constexpr auto LOOP_FOREVER = -1;
 
+const Dali::Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
+
+// Flags for re-sending data to the rasterize thread
+enum Flags
+{
+  RESEND_PLAY_RANGE  = 1 << 0,
+  RESEND_LOOP_COUNT  = 1 << 1
+};
+
 } // unnamed namespace
 
 AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties )
@@ -70,15 +77,21 @@ 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 ),
+  mResendFlag( 0 ),
   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 +111,10 @@ 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, mLoopCount );
+  map.Insert( Toolkit::DevelImageVisual::Property::PLAY_RANGE, mPlayRange );
+  map.Insert( Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast< int >( mVectorRasterizeThread.GetPlayState() ) );
+  map.Insert( Toolkit::DevelImageVisual::Property::CURRENT_PROGRESS, mVectorRasterizeThread.GetCurrentProgress() );
 }
 
 void AnimatedVectorImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
@@ -150,10 +156,7 @@ void AnimatedVectorImageVisual::DoSetProperty( Property::Index index, const Prop
       if( value.Get( loopCount ) )
       {
         mLoopCount = loopCount;
-        if( mVectorRasterizeThread )
-        {
-          mVectorRasterizeThread->SetLoopCount( loopCount );
-        }
+        mResendFlag |= RESEND_LOOP_COUNT;
       }
       break;
     }
@@ -162,23 +165,8 @@ 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 );
-          }
-        }
+        mPlayRange = range;
+        mResendFlag |= RESEND_PLAY_RANGE;
       }
       break;
     }
@@ -217,21 +205,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 +238,36 @@ 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 );
+    }
+
+    SendAnimationData();
+
+    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,48 +279,58 @@ 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;
     }
+    case DevelAnimatedVectorImageVisual::Action::JUMP_TO:
+    {
+      float progress;
+      if( attributes.Get( progress ) )
+      {
+        mVectorRasterizeThread.SetCurrentProgress( progress );
+      }
+      break;
+    }
+    case DevelAnimatedVectorImageVisual::Action::UPDATE_PROPERTY:
+    {
+      Property::Map* map = attributes.GetMap();
+      if( map )
+      {
+        DoSetProperties( *map );
+
+        SendAnimationData();
+      }
+      break;
+    }
   }
 }
 
@@ -350,7 +344,7 @@ void AnimatedVectorImageVisual::OnResourceReady()
     // 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 );
   }
 }
 
@@ -360,6 +354,48 @@ 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 );
+  }
+}
+
+void AnimatedVectorImageVisual::SendAnimationData()
+{
+  if( mResendFlag )
+  {
+    bool isPlaying = false;
+    if( mVectorRasterizeThread.GetPlayState() == DevelImageVisual::PlayState::PLAYING )
+    {
+      mVectorRasterizeThread.PauseAnimation();
+      isPlaying = true;
+    }
+
+    if( mResendFlag & RESEND_LOOP_COUNT )
+    {
+      mVectorRasterizeThread.SetLoopCount( mLoopCount );
+    }
+
+    if( mResendFlag & RESEND_PLAY_RANGE )
+    {
+      mVectorRasterizeThread.SetPlayRange( mPlayRange );
+    }
+
+    if( isPlaying )
+    {
+      mVectorRasterizeThread.PlayAnimation();
+    }
+    else
+    {
+      mVectorRasterizeThread.RenderFrame();
+      Stage::GetCurrent().KeepRendering( 0.0f );
+    }
+
+    mResendFlag = 0;
+  }
 }
 
 } // namespace Internal
index 28d79a4..032bea2 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:
 
@@ -155,6 +156,11 @@ private:
    */
   void OnAnimationFinished();
 
+  /**
+   * @brief Send animation data to the rasterize thread.
+   */
+  void SendAnimationData();
+
   // Undefined
   AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete;
 
@@ -164,12 +170,12 @@ private:
 private:
   ImageVisualShaderFactory&                    mImageVisualShaderFactory;
   VisualUrl                                    mUrl;
+  VectorRasterizeThread                        mVectorRasterizeThread;
   Vector2                                      mVisualSize;
   Vector2                                      mPlayRange;
   WeakHandle< Actor >                          mPlacementActor;
-  std::unique_ptr< VectorRasterizeThread >     mVectorRasterizeThread;
-
   int32_t                                      mLoopCount;
+  uint32_t                                     mResendFlag;
   DevelAnimatedVectorImageVisual::Action::Type mActionStatus;
 };
 
index 536c208..49477ea 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,30 +102,40 @@ 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::StartAnimation()
+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::PlayAnimation()
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
   if( mPlayState != DevelImageVisual::PlayState::PLAYING )
   {
-    if( mPlayState == DevelImageVisual::PlayState::STOPPED )
-    {
-      // Reset the current frame and the current loop
-      mCurrentFrame = mStartFrame;
-      mCurrentLoop = 0;
-    }
-
     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" );
   }
 }
 
@@ -135,6 +146,10 @@ void VectorRasterizeThread::StopAnimation()
   {
     mPlayState = DevelImageVisual::PlayState::STOPPED;
 
+    // Reset the current frame and the current loop
+    mCurrentFrame = mStartFrame;
+    mCurrentLoop = 0;
+
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StopAnimation: Stop\n" );
   }
 }
@@ -153,10 +168,14 @@ void VectorRasterizeThread::PauseAnimation()
 void VectorRasterizeThread::RenderFrame()
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
-  mNeedRender = true;
-  mConditionalWait.Notify( lock );
 
-  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::RenderFrame: Render\n" );
+  if( !mResourceReady )
+  {
+    mNeedRender = true;
+    mConditionalWait.Notify( lock );
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::RenderFrame: Render\n" );
+  }
 }
 
 void VectorRasterizeThread::SetResourceReadyCallback( EventThreadCallback* callback )
@@ -171,35 +190,104 @@ 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 );
+  if( mLoopCount != count )
+  {
+    ConditionalWait::ScopedLock lock( mConditionalWait );
 
-  mLoopCount = count;
+    mLoopCount = count;
 
-  // Reset progress
-  mCurrentLoop = 0;
-  mCurrentFrame = mStartFrame;
+    // Reset progress
+    mCurrentLoop = 0;
+  }
+}
+
+int32_t VectorRasterizeThread::GetLoopCount() const
+{
+  return mLoopCount;
 }
 
 void VectorRasterizeThread::SetPlayRange( Vector2 range )
 {
-  ConditionalWait::ScopedLock lock( mConditionalWait );
+  // 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 );
+    }
+
+    if( mPlayRange != orderedRange )
+    {
+      ConditionalWait::ScopedLock lock( mConditionalWait );
 
-  mPlayRange = range;
+      mPlayRange = orderedRange;
 
-  if( mTotalFrame != 0 )
+      if( mTotalFrame != 0 )
+      {
+        mStartFrame = static_cast< uint32_t >( mPlayRange.x * mTotalFrame + 0.5f );
+        mEndFrame = static_cast< uint32_t >( mPlayRange.y * mTotalFrame + 0.5f );
+
+        // If the current frame is out of the range, change the current frame also.
+        if( mStartFrame > mCurrentFrame )
+        {
+          mCurrentFrame = mStartFrame;
+
+          mResourceReady = false;
+        }
+        else if( mEndFrame < mCurrentFrame )
+        {
+          mCurrentFrame = mEndFrame;
+
+          mResourceReady = false;
+        }
+      }
+    }
+  }
+}
+
+Vector2 VectorRasterizeThread::GetPlayRange() const
+{
+  return mPlayRange;
+}
+
+void VectorRasterizeThread::SetCurrentProgress( float progress )
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+
+  if( progress >= mPlayRange.x && progress <= mPlayRange.y )
   {
-    mStartFrame = static_cast< uint32_t >( mPlayRange.x * mTotalFrame + 0.5f );
-    mEndFrame = static_cast< uint32_t >( mPlayRange.y * mTotalFrame + 0.5f );
+    mProgress = progress;
+
+    if( mTotalFrame != 0 )
+    {
+      mCurrentFrame = static_cast< uint32_t >( mTotalFrame * progress + 0.5f );
+    }
+
+    mResourceReady = false;
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetCurrentProgress: progress = %f (%d)\n", progress, mCurrentFrame );
   }
 }
 
-DevelImageVisual::PlayState VectorRasterizeThread::GetPlayState()
+float VectorRasterizeThread::GetCurrentProgress() const
+{
+  return ( static_cast< float >( mCurrentFrame ) / static_cast< float >( mTotalFrame ) );
+}
+
+DevelImageVisual::PlayState VectorRasterizeThread::GetPlayState() const
 {
   return mPlayState;
 }
 
+bool VectorRasterizeThread::IsResourceReady() const
+{
+  return mResourceReady;
+}
+
 bool VectorRasterizeThread::IsThreadReady()
 {
   ConditionalWait::ScopedLock lock( mConditionalWait );
@@ -225,7 +313,7 @@ bool VectorRasterizeThread::StartRender()
   mStartFrame = static_cast< uint32_t >( mPlayRange.x * mTotalFrame + 0.5f );
   mEndFrame = static_cast< uint32_t >( mPlayRange.y * mTotalFrame + 0.5f );
 
-  mCurrentFrame = mStartFrame;
+  mCurrentFrame = std::max( static_cast< uint32_t >( mTotalFrame * mProgress + 0.5f ), mStartFrame );
 
   DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StartRender: Renderer is started [%d (%d, %d)]\n", mTotalFrame, mStartFrame, mEndFrame );
 
@@ -236,6 +324,14 @@ void VectorRasterizeThread::Rasterize()
 {
   DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: [%d]\n", mCurrentFrame );
 
+  bool needRender, resourceReady;
+
+  {
+    ConditionalWait::ScopedLock lock( mConditionalWait );
+    needRender = mNeedRender;
+    resourceReady = mResourceReady;
+  }
+
   // Rasterize
   mVectorRenderer.Render( mCurrentFrame );
 
@@ -256,6 +352,10 @@ void VectorRasterizeThread::Rasterize()
           // Animation is finished
           mPlayState = DevelImageVisual::PlayState::STOPPED;
 
+          // Reset the current frame and the current loop
+          mCurrentFrame = mStartFrame;
+          mCurrentLoop = 0;
+
           mAnimationFinishedTrigger->Trigger();
 
           DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Animation is finished\n" );
@@ -268,9 +368,12 @@ void VectorRasterizeThread::Rasterize()
     }
   }
 
-  mNeedRender = false;
+  if( needRender )
+  {
+    mNeedRender = false;
+  }
 
-  if( !mResourceReady )
+  if( !resourceReady )
   {
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Resource ready trigger\n" );
 
index 8ee52be..afb71b3 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,34 @@ 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;
+
+  /**
+   * @brief Sets the progress of the animation.
+   * @param[in] progress The new progress as a normalized value between [0,1] or between the play range if specified.
+   */
+  void SetCurrentProgress( float progress );
+
+  /**
+   * @brief Retrieves the current progress of the animation.
+   * @return The current progress as a normalized value between [0,1]
+   */
+  float GetCurrentProgress() const;
 
 protected:
 
@@ -162,14 +196,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 3f4e763..bbef5e4 100644 (file)
@@ -811,6 +811,7 @@ void ImageVisual::DoSetOffStage( Actor& actor )
   if( mReleasePolicy == Toolkit::ImageVisual::ReleasePolicy::DETACHED )
   {
     RemoveTexture(); // If INVALID_TEXTURE_ID then removal will be attempted on atlas
+    mImpl->mResourceStatus = Toolkit::Visual::ResourceStatus::PREPARING;
   }
 
   if( mImageUrl.IsValid() )
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 1ea95a9..7847924 100644 (file)
@@ -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.
@@ -79,6 +79,16 @@ namespace
 
 #ifdef DEBUG_ENABLED
 Debug::Filter* gTextureManagerLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_TEXTURE_MANAGER" );
+
+#define GET_LOAD_STATE_STRING( loadState ) \
+  loadState == TextureManager::NOT_STARTED ? "NOT_STARTED" :             \
+    loadState == TextureManager::LOADING ? "LOADING" :                   \
+    loadState == TextureManager::LOAD_FINISHED ? "LOAD_FINISHED" :       \
+    loadState == TextureManager::WAITING_FOR_MASK ? "WAITING_FOR_MASK" : \
+    loadState == TextureManager::UPLOADED ? "UPLOADED" :                 \
+    loadState == TextureManager::CANCELLED ? "CANCELLED" :               \
+    loadState == TextureManager::LOAD_FAILED ? "LOAD_FAILED" : "Unknown"
+
 #endif
 
 const uint32_t      DEFAULT_ATLAS_SIZE( 1024u );                     ///< This size can fit 8 by 8 images of average size 128 * 128
@@ -117,8 +127,10 @@ TextureManager::TextureManager()
   mAsyncRemoteLoaders( GetNumberOfRemoteLoaderThreads(), [&]() { return AsyncLoadingHelper(*this); } ),
   mExternalTextures(),
   mLifecycleObservers(),
+  mLoadQueue(),
   mBrokenImageUrl(""),
-  mCurrentTextureId( 0 )
+  mCurrentTextureId( 0 ),
+  mQueueLoadFlag(false)
 {
 }
 
@@ -242,13 +254,18 @@ TextureSet TextureManager::LoadTexture(
       }
 
       TextureManager::LoadState loadState = GetTextureStateInternal( textureId );
-      loadingStatus = ( loadState == TextureManager::LOADING );
-
       if( loadState == TextureManager::UPLOADED )
       {
         // UploadComplete has already been called - keep the same texture set
         textureSet = GetTextureSet( textureId );
       }
+
+      // If we are loading the texture, or waiting for the ready signal handler to complete, inform
+      // caller that they need to wait.
+      loadingStatus = ( loadState == TextureManager::LOADING ||
+                        loadState == TextureManager::NOT_STARTED ||
+                        mQueueLoadFlag );
+
     }
     else
     {
@@ -345,7 +362,7 @@ TextureManager::TextureId TextureManager::RequestLoadInternal(
       ++( mTextureInfoContainer[ cacheIndex ].referenceCount );
     }
     textureId = mTextureInfoContainer[ cacheIndex ].textureId;
-    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::RequestLoad( url=%s observer=%p ) Using cached texture id@%d, textureId=%d\n",
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::General, "TextureManager::RequestLoad( url=%s observer=%p ) Using cached texture id@%d, textureId=%d\n",
                    url.GetUrl().c_str(), observer, cacheIndex, textureId );
   }
 
@@ -360,7 +377,7 @@ TextureManager::TextureId TextureManager::RequestLoadInternal(
                                                   preMultiply ) );
     cacheIndex = mTextureInfoContainer.size() - 1u;
 
-    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::RequestLoad( url=%s observer=%p ) New texture, cacheIndex:%d, textureId=%d\n",
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::General, "TextureManager::RequestLoad( url=%s observer=%p ) New texture, cacheIndex:%d, textureId=%d\n",
                    url.GetUrl().c_str(), observer, cacheIndex, textureId );
   }
 
@@ -372,11 +389,8 @@ TextureManager::TextureId TextureManager::RequestLoadInternal(
   textureInfo.storageType = storageType;
   textureInfo.orientationCorrection = orientationCorrection;
 
-  DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureInfo loadState:%s\n",
-                 textureInfo.loadState == TextureManager::NOT_STARTED ? "NOT_STARTED" :
-                 textureInfo.loadState == TextureManager::LOADING ? "LOADING" :
-                 textureInfo.loadState == TextureManager::UPLOADED ? "UPLOADED" :
-                 textureInfo.loadState == TextureManager::CANCELLED ? "CANCELLED" : "Unknown" );
+  DALI_LOG_INFO( gTextureManagerLogFilter, Debug::General, "TextureInfo loadState:%s\n",
+                 GET_LOAD_STATE_STRING(textureInfo.loadState ) );
 
   // Force reloading of texture by setting loadState unless already loading or cancelled.
   if ( TextureManager::ReloadPolicy::FORCED == reloadPolicy && TextureManager::LOADING != textureInfo.loadState &&
@@ -394,8 +408,7 @@ TextureManager::TextureId TextureManager::RequestLoadInternal(
     case TextureManager::LOAD_FAILED: // Failed notifies observer which then stops observing.
     case TextureManager::NOT_STARTED:
     {
-      LoadTexture( textureInfo );
-      ObserveTexture( textureInfo, observer );
+      LoadOrQueueTexture( textureInfo, observer ); // If called inside NotifyObservers, queues until afterwards
       break;
     }
     case TextureManager::LOADING:
@@ -407,11 +420,7 @@ TextureManager::TextureId TextureManager::RequestLoadInternal(
     {
       if( observer )
       {
-        // The Texture has already loaded. The other observers have already been notified.
-        // We need to send a "late" loaded notification for this observer.
-        observer->UploadComplete( true, textureInfo.textureId, textureInfo.textureSet,
-                                  textureInfo.useAtlas, textureInfo.atlasRect,
-                                  textureInfo.preMultiplied );
+        LoadOrQueueTexture( textureInfo, observer );
       }
       break;
     }
@@ -440,12 +449,10 @@ void TextureManager::Remove( const TextureManager::TextureId textureId )
   {
     TextureInfo& textureInfo( mTextureInfoContainer[ textureInfoIndex ] );
 
-    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::Remove(%d) cacheIdx:%d loadState:%s\n",
-                   textureId, textureInfoIndex,
-                   textureInfo.loadState == TextureManager::NOT_STARTED ? "NOT_STARTED" :
-                   textureInfo.loadState == TextureManager::LOADING ? "LOADING" :
-                   textureInfo.loadState == TextureManager::UPLOADED ? "UPLOADED" :
-                   textureInfo.loadState == TextureManager::CANCELLED ? "CANCELLED" : "Unknown" );
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise,
+                   "TextureManager::Remove(%d) url:%s\n  cacheIdx:%d loadState:%s\n",
+                   textureId, textureInfo.url.GetUrl().c_str(),
+                   textureInfoIndex, GET_LOAD_STATE_STRING( textureInfo.loadState ) );
 
     // Decrement the reference count and check if this is the last user of this Texture.
     if( --textureInfo.referenceCount <= 0 )
@@ -624,32 +631,101 @@ void TextureManager::RemoveObserver( TextureManager::LifecycleObserver& observer
   DALI_ASSERT_DEBUG(endIter != mLifecycleObservers.End());
 }
 
+void TextureManager::LoadOrQueueTexture( TextureInfo& textureInfo, TextureUploadObserver* observer )
+{
+  switch( textureInfo.loadState )
+  {
+    case NOT_STARTED:
+    case LOAD_FAILED:
+    {
+      if( mQueueLoadFlag )
+      {
+        QueueLoadTexture( textureInfo, observer );
+      }
+      else
+      {
+        LoadTexture( textureInfo, observer );
+      }
+      break;
+    }
+    case LOADING:
+    case UPLOADED:
+    {
+      if( mQueueLoadFlag )
+      {
+        QueueLoadTexture( textureInfo, observer );
+      }
+      else
+      {
+        // The Texture has already loaded. The other observers have already been notified.
+        // We need to send a "late" loaded notification for this observer.
+        observer->UploadComplete( true, textureInfo.textureId, textureInfo.textureSet,
+                                  textureInfo.useAtlas, textureInfo.atlasRect,
+                                  textureInfo.preMultiplied );
+      }
+    }
+    case CANCELLED:
+    case LOAD_FINISHED:
+    case WAITING_FOR_MASK:
+    {
+      break;
+    }
+  }
+}
+
+void TextureManager::QueueLoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer )
+{
+  auto textureId = textureInfo.textureId;
+  mLoadQueue.PushBack( LoadQueueElement( textureId, observer) );
+}
 
-bool TextureManager::LoadTexture( TextureInfo& textureInfo )
+void TextureManager::LoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer )
 {
-  bool success = true;
+  DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::LoadTexture(): url:%s sync:%s\n",
+                 textureInfo.url.GetUrl().c_str(), textureInfo.loadSynchronously?"T":"F" );
 
-  if( textureInfo.loadState == NOT_STARTED )
+  textureInfo.loadState = LOADING;
+  if( !textureInfo.loadSynchronously )
   {
-    textureInfo.loadState = LOADING;
+    auto& loadersContainer = textureInfo.url.IsLocalResource() ? mAsyncLocalLoaders : mAsyncRemoteLoaders;
+    auto loadingHelperIt = loadersContainer.GetNext();
+    DALI_ASSERT_ALWAYS(loadingHelperIt != loadersContainer.End());
+    loadingHelperIt->Load(textureInfo.textureId, textureInfo.url,
+                          textureInfo.desiredSize, textureInfo.fittingMode,
+                          textureInfo.samplingMode, textureInfo.orientationCorrection );
+  }
+  ObserveTexture( textureInfo, observer );
+}
 
-    if( !textureInfo.loadSynchronously )
+void TextureManager::ProcessQueuedTextures()
+{
+  for( auto&& element : mLoadQueue )
+  {
+    int cacheIndex = GetCacheIndexFromId( element.mTextureId );
+    if( cacheIndex != INVALID_CACHE_INDEX )
     {
-      auto& loadersContainer = textureInfo.url.IsLocalResource() ? mAsyncLocalLoaders : mAsyncRemoteLoaders;
-      auto loadingHelperIt = loadersContainer.GetNext();
-      DALI_ASSERT_ALWAYS(loadingHelperIt != loadersContainer.End());
-      loadingHelperIt->Load(textureInfo.textureId, textureInfo.url,
-                            textureInfo.desiredSize, textureInfo.fittingMode,
-                            textureInfo.samplingMode, textureInfo.orientationCorrection );
+      TextureInfo& textureInfo( mTextureInfoContainer[cacheIndex] );
+      if( textureInfo.loadState == UPLOADED )
+      {
+        element.mObserver->UploadComplete( true, textureInfo.textureId, textureInfo.textureSet,
+                                           textureInfo.useAtlas, textureInfo.atlasRect,
+                                           textureInfo.preMultiplied );
+      }
+      else
+      {
+        LoadTexture( textureInfo, element.mObserver );
+      }
     }
   }
-
-  return success;
+  mLoadQueue.Clear();
 }
 
 void TextureManager::ObserveTexture( TextureInfo& textureInfo,
                                      TextureUploadObserver* observer )
 {
+  DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::ObserveTexture(): url:%s observer:%p\n",
+                 textureInfo.url.GetUrl().c_str(), observer );
+
   if( observer )
   {
     textureInfo.observerList.PushBack( observer );
@@ -673,7 +749,9 @@ void TextureManager::AsyncLoadComplete( AsyncLoadingInfoContainerType& loadingCo
       {
         TextureInfo& textureInfo( mTextureInfoContainer[cacheIndex] );
 
-        DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "  CacheIndex:%d LoadState: %d\n", cacheIndex, textureInfo.loadState );
+        DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise,
+                       "  textureId:%d Url:%s CacheIndex:%d LoadState: %d\n",
+                       textureInfo.textureId, textureInfo.url.GetUrl().c_str(), cacheIndex, textureInfo.loadState );
 
         if( textureInfo.loadState != CANCELLED )
         {
@@ -788,12 +866,11 @@ void TextureManager::ApplyMask(
   }
 }
 
-
 void TextureManager::UploadTexture( Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo )
 {
   if( textureInfo.useAtlas != USE_ATLAS )
   {
-    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "  TextureManager::UploadTexture() New Texture for textureId:%d\n", textureInfo.textureId );
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::General, "  TextureManager::UploadTexture() New Texture for textureId:%d\n", textureInfo.textureId );
 
     // If the texture doesn't have an alpha channel, can't pre-multiply it.
     // Ensure that we don't change the load parameter (it's used for hashing), and instead set
@@ -828,53 +905,50 @@ void TextureManager::NotifyObservers( TextureInfo& textureInfo, bool success )
 
   // If there is an observer: Notify the load is complete, whether successful or not,
   // and erase it from the list
-  unsigned int observerCount = textureInfo.observerList.Count();
   TextureInfo* info = &textureInfo;
 
-  while( observerCount )
+  mQueueLoadFlag = true;
+
+  while( info->observerList.Count() )
   {
     TextureUploadObserver* observer = info->observerList[0];
 
     // During UploadComplete() a Control ResourceReady() signal is emitted.
     // During that signal the app may add remove /add Textures (e.g. via
-    // ImageViews).  At this point no more observers can be added to the
-    // observerList, because textureInfo.loadState = UPLOADED. However it is
-    // possible for observers to be removed, hence we check the observer list
-    // count every iteration.
-
-    // The reference to the textureInfo struct can also become invalidated,
-    // because new load requests can modify the mTextureInfoContainer list
-    // (e.g. if more requests are pushed back it can cause the list to be
-    // resized invalidating the reference to the TextureInfo ).
+    // ImageViews).
+    // It is possible for observers to be removed from the observer list,
+    // and it is also possible for the mTextureInfoContainer to be modified,
+    // invalidating the reference to the textureInfo struct.
+    // Texture load requests for the same URL are deferred until the end of this
+    // method.
+    DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "NotifyObservers() url:%s loadState:%s\n",
+                   textureInfo.url.GetUrl().c_str(), GET_LOAD_STATE_STRING(textureInfo.loadState ) );
+
     observer->UploadComplete( success, info->textureId, info->textureSet, info->useAtlas, info->atlasRect,
                               info->preMultiplied );
     observer->DestructionSignal().Disconnect( this, &TextureManager::ObserverDestroyed );
 
-    // Get the textureInfo from the container again as it may have been
-    // invalidated,
-
+    // Get the textureInfo from the container again as it may have been invalidated.
     int textureInfoIndex = GetCacheIndexFromId( textureId );
     if( textureInfoIndex == INVALID_CACHE_INDEX)
     {
-      return; // texture has been removed - can stop.
+      break; // texture has been removed - can stop.
     }
-
     info = &mTextureInfoContainer[ textureInfoIndex ];
-    observerCount = info->observerList.Count();
-    if ( observerCount > 0 )
+
+    // remove the observer that was just triggered if it's still in the list
+    for( TextureInfo::ObserverListType::Iterator j = info->observerList.Begin(); j != info->observerList.End(); ++j )
     {
-      // remove the observer that was just triggered if it's still in the list
-      for( TextureInfo::ObserverListType::Iterator j = info->observerList.Begin(); j != info->observerList.End(); ++j )
+      if( *j == observer )
       {
-        if( *j == observer )
-        {
-          info->observerList.Erase( j );
-          observerCount--;
-          break;
-        }
+        info->observerList.Erase( j );
+        break;
       }
     }
   }
+
+  mQueueLoadFlag = false;
+  ProcessQueuedTextures();
 }
 
 TextureManager::TextureId TextureManager::GenerateUniqueTextureId()
index 6df17c6..502cf11 100755 (executable)
@@ -424,6 +424,8 @@ private:
 
   typedef size_t TextureHash; ///< The type used to store the hash used for Texture caching.
 
+  // Structs:
+
   /**
    * @brief This struct is used to manage the life-cycle of Texture loading and caching.
    */
@@ -495,7 +497,20 @@ private:
     bool preMultiplied:1;          ///< true if the image's color was multiplied by it's alpha
   };
 
-  // Structs:
+  /**
+   * Structure to hold info about a texture load queued during NotifyObservers
+   */
+  struct LoadQueueElement
+  {
+    LoadQueueElement( TextureId textureId, TextureUploadObserver* observer )
+    : mTextureId( textureId ),
+      mObserver( observer )
+    {
+    }
+
+    TextureId mTextureId; ///< The texture id of the requested load.
+    TextureUploadObserver* mObserver; ///< Observer of texture load.
+  };
 
   /**
    * Struct to hold information about a requested Async load.
@@ -519,16 +534,35 @@ private:
   typedef std::vector<TextureInfo>      TextureInfoContainerType;       ///< The container type used to manage the life-cycle and caching of Textures
 
   /**
+   * @brief Initiate a load or queue load if NotifyObservers is invoking callbacks
+   * @param[in] textureInfo The TextureInfo struct associated with the Texture
+   * @param[in] observer The observer wishing to observe the texture upload
+   */
+  void LoadOrQueueTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+
+  /**
+   * @brief Queue a texture load to be subsequently handled by ProcessQueuedTextures.
+   * @param[in] textureInfo The TextureInfo struct associated with the Texture
+   * @param[in] observer The observer wishing to observe the texture upload
+   */
+  void QueueLoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+
+  /**
    * @brief Used internally to initiate a load.
    * @param[in] textureInfo The TextureInfo struct associated with the Texture
-   * @return                True if the load was initiated
+   * @param[in] observer The observer wishing to observe the texture upload
+   */
+  void LoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+
+  /**
+   * @brief Initiate load of textures queued whilst NotifyObservers invoking callbacks.
    */
-  bool LoadTexture( TextureInfo& textureInfo );
+  void ProcessQueuedTextures();
 
   /**
    * Add the observer to the observer list
    * @param[in] textureInfo The TextureInfo struct associated with the texture
-   * observer The observer wishing to observe the texture upload
+   * @param[in] observer The observer wishing to observe the texture upload
    */
   void ObserveTexture( TextureInfo & textureInfo, TextureUploadObserver* observer );
 
@@ -747,8 +781,10 @@ private:  // Member Variables:
   RoundRobinContainerView< AsyncLoadingHelper > mAsyncRemoteLoaders;   ///< The Asynchronous image loaders used to provide all remote async loads
   std::vector< ExternalTextureInfo >            mExternalTextures;     ///< Externally provided textures
   Dali::Vector<LifecycleObserver*>              mLifecycleObservers;   ///< Lifecycle observers of texture manager
+  Dali::Vector<LoadQueueElement>                mLoadQueue;            ///< Queue of textures to load after NotifyObservers
   std::string                                   mBrokenImageUrl;       ///< Broken image url
   TextureId                                     mCurrentTextureId;     ///< The current value used for the unique Texture Id generation
+  bool                                          mQueueLoadFlag;        ///< Flag that causes Load Textures to be queued.
 };
 
 
index d30729b..2c8183c 100644 (file)
@@ -60,6 +60,10 @@ namespace Internal
 namespace
 {
 
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_CONTROL_VISUALS");
+#endif
+
 BaseHandle Create()
 {
   BaseHandle handle = Toolkit::VisualFactory::Get();
@@ -273,9 +277,19 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
     }
   }
 
+  DALI_LOG_INFO( gLogFilter, Debug::Concise, "VisualFactory::CreateVisual( VisualType:%s %s%s)\n",
+                 Scripting::GetEnumerationName<Toolkit::DevelVisual::Type>( visualType,
+                                                                            VISUAL_TYPE_TABLE,
+                                                                            VISUAL_TYPE_TABLE_COUNT ),
+                 visualType==Toolkit::DevelVisual::IMAGE?"url:":"",
+                 visualType==Toolkit::DevelVisual::IMAGE ?
+                 propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME)->Get<std::string>().c_str()
+                 :"" );
+
+
   if( !visualPtr )
   {
-    DALI_LOG_ERROR( "Renderer type unknown\n" );
+    DALI_LOG_ERROR( "VisualType unknown\n" );
   }
 
   if( mDebugEnabled && visualType !=  Toolkit::DevelVisual::WIREFRAME )
index e0382b3..dfa8fef 100644 (file)
@@ -100,7 +100,9 @@ const char * const RELEASE_POLICY_NAME("releasePolicy");
 const char * const ORIENTATION_CORRECTION_NAME("orientationCorrection");
 const char * const AUXILIARY_IMAGE_NAME("auxiliaryImage");
 const char * const AUXILIARY_IMAGE_ALPHA_NAME("auxiliaryImageAlpha");
-const char * const PLAY_RANGE_NAME("playRange");
+const char * const PLAY_RANGE_NAME( "playRange" );
+const char * const PLAY_STATE_NAME( "playState" );
+const char * const CURRENT_PROGRESS_NAME( "currentProgress" );
 
 // Text visual
 const char * const TEXT_PROPERTY( "text" );
index 6ae808b..7e20d3b 100644 (file)
@@ -86,6 +86,8 @@ extern const char * const ORIENTATION_CORRECTION_NAME;
 extern const char * const AUXILLARY_IMAGE_NAME;
 extern const char * const AUXILLARY_IMAGE_ALPHA_NAME;
 extern const char * const PLAY_RANGE_NAME;
+extern const char * const PLAY_STATE_NAME;
+extern const char * const CURRENT_PROGRESS_NAME;
 
 // Text visual
 extern const char * const TEXT_PROPERTY;
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..d0f8e30 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 = 6;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index b6e3c76..ffbc581 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.4.4
+Version:    1.4.6
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT