[dali_2.2.50] Merge branch 'devel/master' 83/300583/1
authorDavid Steele <david.steele@samsung.com>
Fri, 27 Oct 2023 09:36:05 +0000 (10:36 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 27 Oct 2023 09:36:06 +0000 (10:36 +0100)
Change-Id: Iab0e8438986b57ce6f0948e122488cc4c648c332

automated-tests/src/dali-scene3d/utc-Dali-Model.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
dali-scene3d/internal/graphics/shaders/default-physically-based-shader.vert
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/text-controls/common-text-utils.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/visuals/svg/svg-visual.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 2e78e66..0962643 100644 (file)
@@ -1465,7 +1465,7 @@ int UtcDaliModelResourceCacheCheck(void)
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(2), true, TEST_LOCATION);
   application.SendNotification();
   application.Render();
 
index 73f4cf7..29abcd2 100644 (file)
@@ -1233,9 +1233,10 @@ int UtcDaliAnimatedImageVisualMultiImage01(void)
     tet_infoline("Test that after 2 ticks that we have 6 textures");
 
     Test::EmitGlobalTimerSignal();
-    application.SendNotification();
-    application.Render(16);
-    DALI_TEST_EQUALS(gl.GetNumGeneratedTextures(), 6, TEST_LOCATION);
+    // TODO : Open this logic if we make AsyncTaskManager for toolkit UTC doesn't execute by SendNotification().
+    //application.SendNotification();
+    //application.Render(16);
+    //DALI_TEST_EQUALS(gl.GetNumGeneratedTextures(), 6, TEST_LOCATION);
 
     tet_infoline("And that at least 2 textures were requested");
     DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(2), true, TEST_LOCATION);
@@ -1245,9 +1246,10 @@ int UtcDaliAnimatedImageVisualMultiImage01(void)
 
     tet_infoline("Test that after 3rd tick that we have 7 textures and 1 request");
     Test::EmitGlobalTimerSignal();
-    application.SendNotification();
-    application.Render(16);
-    DALI_TEST_EQUALS(gl.GetNumGeneratedTextures(), 7, TEST_LOCATION);
+    // TODO : Open this logic if we make AsyncTaskManager for toolkit UTC doesn't execute by SendNotification().
+    //application.SendNotification();
+    //application.Render(16);
+    //DALI_TEST_EQUALS(gl.GetNumGeneratedTextures(), 7, TEST_LOCATION);
 
     DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
     application.SendNotification();
index a162965..2f2901f 100644 (file)
@@ -576,16 +576,8 @@ int UtcDaliImageViewAsyncLoadingWithAtlasing(void)
   // loading is not started if the actor is offScene
 
   application.GetScene().Add(imageView);
-  application.SendNotification();
-  application.Render(16);
-  application.Render(16);
-  application.SendNotification();
 
   imageView.SetProperty(Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT);
-  application.SendNotification();
-  application.Render(16);
-  application.Render(16);
-  application.SendNotification();
 
   // loading started, this waits for the loader thread for max 30 seconds
   DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
@@ -623,10 +615,6 @@ int UtcDaliImageViewAsyncLoadingWithAtlasing02(void)
   imageView.SetProperty(ImageView::Property::IMAGE, asyncLoadingMap);
 
   application.GetScene().Add(imageView);
-  application.SendNotification();
-  application.Render(16);
-  application.Render(16);
-  application.SendNotification();
 
   // loading started, this waits for the loader thread for max 30 seconds
   DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
@@ -831,10 +819,6 @@ int UtcDaliImageViewAsyncLoadingEncodedBufferWithAtlasing(void)
   imageView.SetProperty(ImageView::Property::IMAGE, imageMap);
 
   imageView.SetProperty(Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT);
-  application.SendNotification();
-  application.Render(16);
-  application.Render(16);
-  application.SendNotification();
 
   // loading started, this waits for the loader thread for max 30 seconds
   DALI_TEST_EQUALS(Test::WaitForEventThreadTrigger(1), true, TEST_LOCATION);
@@ -1068,7 +1052,7 @@ void OnResourceReadySignalSVG(Control control)
   DALI_TEST_CHECK(retMap);
 
   // Fitting mode should not be applied at this point
-  DALI_TEST_EQUALS(retMap->Find(Visual::Transform::Property::SIZE)->Get<Vector2>(),  Vector2::ZERO, TEST_LOCATION);
+  DALI_TEST_EQUALS(retMap->Find(Visual::Transform::Property::SIZE)->Get<Vector2>(), Vector2::ZERO, TEST_LOCATION);
 }
 
 int UtcDaliImageViewCheckResourceReady(void)
@@ -2869,7 +2853,7 @@ int UtcDaliImageViewSyncSVGLoading02(void)
     DALI_TEST_CHECK(retMap);
 
     // Image Visual should be positioned depending on ImageView's padding
-    DALI_TEST_EQUALS(retMap->Find(Visual::Transform::Property::SIZE)->Get<Vector2>(),  Vector2(100, 100), TEST_LOCATION);
+    DALI_TEST_EQUALS(retMap->Find(Visual::Transform::Property::SIZE)->Get<Vector2>(), Vector2(100, 100), TEST_LOCATION);
 
     Vector3 naturalSize = imageView.GetNaturalSize();
     DALI_TEST_EQUALS(naturalSize.width, 100.0f, TEST_LOCATION);
index 6f637ed..a63addb 100644 (file)
@@ -80,6 +80,7 @@ void main()
     highp int vertexId = 0;
     highp int x = 0;
     highp int y = 0;
+    highp float weight = clamp(uBlendShapeWeight[index], 0.0, 1.0);
 
 #ifdef MORPH_POSITION
     // Calculate the index to retrieve the geometry from the texture.
@@ -88,7 +89,7 @@ void main()
     y = vertexId / width;
 
     // Retrieves the blend shape geometry from the texture, unnormalizes it and multiply by the weight.
-    if( 0.0 != uBlendShapeWeight[index] )
+    if(0.0 != weight)
     {
 #ifdef MORPH_VERSION_2_0
        highp float unnormalizeFactor = uBlendShapeUnnormalizeFactor;
@@ -96,7 +97,7 @@ void main()
        highp float unnormalizeFactor = uBlendShapeUnnormalizeFactor[index];
 #endif
 
-      diff = uBlendShapeWeight[index] * unnormalizeFactor * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
+      diff = weight * unnormalizeFactor * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
     }
 
     position.xyz += diff;
@@ -111,9 +112,9 @@ void main()
     y = vertexId / width;
 
     // Retrieves the blend shape normal from the texture, unnormalizes it and multiply by the weight.
-    if( 0.0 != uBlendShapeWeight[index] )
+    if(0.0 != weight)
     {
-      diff = uBlendShapeWeight[index] * 2.0 * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
+      diff = weight * 2.0 * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
     }
 
     normal += diff.xyz;
@@ -128,9 +129,9 @@ void main()
     y = vertexId / width;
 
     // Retrieves the blend shape tangent from the texture, unnormalizes it and multiply by the weight.
-    if( 0.0 != uBlendShapeWeight[index] )
+    if(0.0 != weight)
     {
-      diff = uBlendShapeWeight[index] * 2.0 * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
+      diff = weight * 2.0 * ( texelFetch( sBlendShapeGeometry, ivec2(x, y), 0 ).xyz - 0.5 );
     }
 
     tangent += diff.xyz;
index bc65701..9c9a1f2 100644 (file)
@@ -1084,7 +1084,7 @@ const Vector4& Popup::GetBackingColor() const
 
 void Popup::SetTailUpImage(std::string image)
 {
-  mTailUpImage = image;
+  mTailUpImage = std::move(image);
   mLayoutDirty = true;
   LayoutTail();
 }
@@ -1096,7 +1096,7 @@ const std::string& Popup::GetTailUpImage() const
 
 void Popup::SetTailDownImage(std::string image)
 {
-  mTailDownImage = image;
+  mTailDownImage = std::move(image);
   mLayoutDirty   = true;
   LayoutTail();
 }
@@ -1108,7 +1108,7 @@ const std::string& Popup::GetTailDownImage() const
 
 void Popup::SetTailLeftImage(std::string image)
 {
-  mTailLeftImage = image;
+  mTailLeftImage = std::move(image);
   mLayoutDirty   = true;
   LayoutTail();
 }
@@ -1120,7 +1120,7 @@ const std::string& Popup::GetTailLeftImage() const
 
 void Popup::SetTailRightImage(std::string image)
 {
-  mTailRightImage = image;
+  mTailRightImage = std::move(image);
   mLayoutDirty    = true;
   LayoutTail();
 }
@@ -1306,7 +1306,7 @@ void Popup::SetProperty(BaseObject* object, Property::Index propertyIndex, const
         std::string valueString;
         if(value.Get(valueString))
         {
-          Toolkit::ImageView actor = Toolkit::ImageView::New(valueString);
+          Toolkit::ImageView actor = Toolkit::ImageView::New(std::move(valueString));
           popupImpl.SetPopupBackgroundImage(actor);
         }
         break;
@@ -1341,7 +1341,7 @@ void Popup::SetProperty(BaseObject* object, Property::Index propertyIndex, const
         std::string valueString;
         if(value.Get(valueString))
         {
-          popupImpl.SetTailUpImage(valueString);
+          popupImpl.SetTailUpImage(std::move(valueString));
         }
         break;
       }
@@ -1350,7 +1350,7 @@ void Popup::SetProperty(BaseObject* object, Property::Index propertyIndex, const
         std::string valueString;
         if(value.Get(valueString))
         {
-          popupImpl.SetTailDownImage(valueString);
+          popupImpl.SetTailDownImage(std::move(valueString));
         }
         break;
       }
@@ -1359,7 +1359,7 @@ void Popup::SetProperty(BaseObject* object, Property::Index propertyIndex, const
         std::string valueString;
         if(value.Get(valueString))
         {
-          popupImpl.SetTailLeftImage(valueString);
+          popupImpl.SetTailLeftImage(std::move(valueString));
         }
         break;
       }
@@ -1368,7 +1368,7 @@ void Popup::SetProperty(BaseObject* object, Property::Index propertyIndex, const
         std::string valueString;
         if(value.Get(valueString))
         {
-          popupImpl.SetTailRightImage(valueString);
+          popupImpl.SetTailRightImage(std::move(valueString));
         }
         break;
       }
@@ -1392,21 +1392,21 @@ Property::Value Popup::GetProperty(BaseObject* object, Property::Index propertyI
       {
         Property::Map map;
         Scripting::CreatePropertyMap(popupImpl.GetTitle(), map);
-        value = map;
+        value = std::move(map);
         break;
       }
       case Toolkit::Popup::Property::CONTENT:
       {
         Property::Map map;
         Scripting::CreatePropertyMap(popupImpl.GetContent(), map);
-        value = map;
+        value = std::move(map);
         break;
       }
       case Toolkit::Popup::Property::FOOTER:
       {
         Property::Map map;
         Scripting::CreatePropertyMap(popupImpl.GetFooter(), map);
-        value = map;
+        value = std::move(map);
         break;
       }
       case Toolkit::Popup::Property::DISPLAY_STATE:
@@ -1448,14 +1448,14 @@ Property::Value Popup::GetProperty(BaseObject* object, Property::Index propertyI
       {
         // Note: Cannot retrieve property map from animation.
         Property::Map map;
-        value = map;
+        value = std::move(map);
         break;
       }
       case Toolkit::Popup::Property::EXIT_ANIMATION:
       {
         // Note: Cannot retrieve property map from animation.
         Property::Map map;
-        value = map;
+        value = std::move(map);
         break;
       }
       case Toolkit::Popup::Property::AUTO_HIDE_DELAY:
@@ -2003,7 +2003,7 @@ std::string Popup::PopupAccessible::GetNameRaw() const
   if(popupTitle)
   {
     std::string titleText = popupTitle.GetProperty<std::string>(Toolkit::TextLabel::Property::TEXT);
-    title                 = titleText;
+    title                 = std::move(titleText);
   }
   else
   {
@@ -2011,7 +2011,7 @@ std::string Popup::PopupAccessible::GetNameRaw() const
     if(popupContent)
     {
       std::string contentText = popupContent.GetProperty<std::string>(Toolkit::TextLabel::Property::TEXT);
-      title                   = contentText;
+      title                   = std::move(contentText);
     }
   }
   return title;
index 6ece809..b18cb98 100644 (file)
@@ -203,7 +203,7 @@ Accessibility::Range TextControlAccessible::GetRangeOfSelection(std::size_t sele
   auto endOffset   = static_cast<std::size_t>(indices.second);
   auto text        = GetText(startOffset, endOffset);
 
-  return {startOffset, endOffset, text};
+  return {startOffset, endOffset, std::move(text)};
 }
 
 std::string TextControlAccessible::GetText(std::size_t startOffset, std::size_t endOffset) const
index 987f297..696b8e2 100644 (file)
@@ -490,7 +490,7 @@ void WebView::EvaluateJavaScript(const std::string& script, std::function<void(c
 {
   if(mWebEngine)
   {
-    mWebEngine.EvaluateJavaScript(script, resultHandler);
+    mWebEngine.EvaluateJavaScript(script, std::move(resultHandler));
   }
 }
 
@@ -498,7 +498,7 @@ void WebView::AddJavaScriptMessageHandler(const std::string& exposedObjectName,
 {
   if(mWebEngine)
   {
-    mWebEngine.AddJavaScriptMessageHandler(exposedObjectName, handler);
+    mWebEngine.AddJavaScriptMessageHandler(exposedObjectName, std::move(handler));
   }
 }
 
@@ -506,7 +506,7 @@ void WebView::RegisterJavaScriptAlertCallback(Dali::WebEnginePlugin::JavaScriptA
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterJavaScriptAlertCallback(callback);
+    mWebEngine.RegisterJavaScriptAlertCallback(std::move(callback));
   }
 }
 
@@ -522,7 +522,7 @@ void WebView::RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScrip
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterJavaScriptConfirmCallback(callback);
+    mWebEngine.RegisterJavaScriptConfirmCallback(std::move(callback));
   }
 }
 
@@ -538,7 +538,7 @@ void WebView::RegisterJavaScriptPromptCallback(Dali::WebEnginePlugin::JavaScript
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterJavaScriptPromptCallback(callback);
+    mWebEngine.RegisterJavaScriptPromptCallback(std::move(callback));
   }
 }
 
@@ -566,7 +566,7 @@ bool WebView::CreateHitTestAsynchronously(int32_t x, int32_t y, Dali::WebEngineH
   bool result = false;
   if(mWebEngine)
   {
-    result = mWebEngine.CreateHitTestAsynchronously(x, y, mode, callback);
+    result = mWebEngine.CreateHitTestAsynchronously(x, y, mode, std::move(callback));
   }
   return result;
 }
@@ -634,20 +634,20 @@ Dali::Toolkit::ImageView WebView::GetScreenshot(Dali::Rect<int32_t> viewArea, fl
 
 bool WebView::GetScreenshotAsynchronously(Dali::Rect<int32_t> viewArea, float scaleFactor, Dali::Toolkit::WebView::WebViewScreenshotCapturedCallback callback)
 {
-  mScreenshotCapturedCallback = callback;
+  mScreenshotCapturedCallback = std::move(callback);
   return mWebEngine ? mWebEngine.GetScreenshotAsynchronously(viewArea, scaleFactor, std::bind(&WebView::OnScreenshotCaptured, this, std::placeholders::_1)) : false;
 }
 
 bool WebView::CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback)
 {
-  return mWebEngine ? mWebEngine.CheckVideoPlayingAsynchronously(callback) : false;
+  return mWebEngine ? mWebEngine.CheckVideoPlayingAsynchronously(std::move(callback)) : false;
 }
 
 void WebView::RegisterGeolocationPermissionCallback(Dali::WebEnginePlugin::GeolocationPermissionCallback callback)
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterGeolocationPermissionCallback(callback);
+    mWebEngine.RegisterGeolocationPermissionCallback(std::move(callback));
   }
 }
 
@@ -698,7 +698,7 @@ void WebView::RegisterPageLoadStartedCallback(Dali::WebEnginePlugin::WebEnginePa
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterPageLoadStartedCallback(callback);
+    mWebEngine.RegisterPageLoadStartedCallback(std::move(callback));
   }
 }
 
@@ -706,7 +706,7 @@ void WebView::RegisterPageLoadInProgressCallback(Dali::WebEnginePlugin::WebEngin
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterPageLoadInProgressCallback(callback);
+    mWebEngine.RegisterPageLoadInProgressCallback(std::move(callback));
   }
 }
 
@@ -714,7 +714,7 @@ void WebView::RegisterPageLoadFinishedCallback(Dali::WebEnginePlugin::WebEngineP
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterPageLoadFinishedCallback(callback);
+    mWebEngine.RegisterPageLoadFinishedCallback(std::move(callback));
   }
 }
 
@@ -722,7 +722,7 @@ void WebView::RegisterPageLoadErrorCallback(Dali::WebEnginePlugin::WebEnginePage
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterPageLoadErrorCallback(callback);
+    mWebEngine.RegisterPageLoadErrorCallback(std::move(callback));
   }
 }
 
@@ -730,7 +730,7 @@ void WebView::RegisterScrollEdgeReachedCallback(Dali::WebEnginePlugin::WebEngine
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterScrollEdgeReachedCallback(callback);
+    mWebEngine.RegisterScrollEdgeReachedCallback(std::move(callback));
   }
 }
 
@@ -738,7 +738,7 @@ void WebView::RegisterUrlChangedCallback(Dali::WebEnginePlugin::WebEngineUrlChan
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterUrlChangedCallback(callback);
+    mWebEngine.RegisterUrlChangedCallback(std::move(callback));
   }
 }
 
@@ -746,20 +746,20 @@ void WebView::RegisterFormRepostDecidedCallback(Dali::WebEnginePlugin::WebEngine
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterFormRepostDecidedCallback(callback);
+    mWebEngine.RegisterFormRepostDecidedCallback(std::move(callback));
   }
 }
 
 void WebView::RegisterFrameRenderedCallback(Dali::WebEnginePlugin::WebEngineFrameRenderedCallback callback)
 {
-  mFrameRenderedCallback = callback;
+  mFrameRenderedCallback = std::move(callback);
 }
 
 void WebView::RegisterConsoleMessageReceivedCallback(Dali::WebEnginePlugin::WebEngineConsoleMessageReceivedCallback callback)
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterConsoleMessageReceivedCallback(callback);
+    mWebEngine.RegisterConsoleMessageReceivedCallback(std::move(callback));
   }
 }
 
@@ -767,7 +767,7 @@ void WebView::RegisterResponsePolicyDecidedCallback(Dali::WebEnginePlugin::WebEn
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterResponsePolicyDecidedCallback(callback);
+    mWebEngine.RegisterResponsePolicyDecidedCallback(std::move(callback));
   }
 }
 
@@ -775,7 +775,7 @@ void WebView::RegisterNavigationPolicyDecidedCallback(Dali::WebEnginePlugin::Web
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterNavigationPolicyDecidedCallback(callback);
+    mWebEngine.RegisterNavigationPolicyDecidedCallback(std::move(callback));
   }
 }
 
@@ -783,7 +783,7 @@ void WebView::RegisterNewWindowCreatedCallback(Dali::WebEnginePlugin::WebEngineN
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterNewWindowCreatedCallback(callback);
+    mWebEngine.RegisterNewWindowCreatedCallback(std::move(callback));
   }
 }
 
@@ -791,7 +791,7 @@ void WebView::RegisterCertificateConfirmedCallback(Dali::WebEnginePlugin::WebEng
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterCertificateConfirmedCallback(callback);
+    mWebEngine.RegisterCertificateConfirmedCallback(std::move(callback));
   }
 }
 
@@ -799,7 +799,7 @@ void WebView::RegisterSslCertificateChangedCallback(Dali::WebEnginePlugin::WebEn
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterSslCertificateChangedCallback(callback);
+    mWebEngine.RegisterSslCertificateChangedCallback(std::move(callback));
   }
 }
 
@@ -807,7 +807,7 @@ void WebView::RegisterHttpAuthHandlerCallback(Dali::WebEnginePlugin::WebEngineHt
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterHttpAuthHandlerCallback(callback);
+    mWebEngine.RegisterHttpAuthHandlerCallback(std::move(callback));
   }
 }
 
@@ -815,7 +815,7 @@ void WebView::RegisterContextMenuShownCallback(Dali::WebEnginePlugin::WebEngineC
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterContextMenuShownCallback(callback);
+    mWebEngine.RegisterContextMenuShownCallback(std::move(callback));
   }
 }
 
@@ -823,7 +823,7 @@ void WebView::RegisterContextMenuHiddenCallback(Dali::WebEnginePlugin::WebEngine
 {
   if(mWebEngine)
   {
-    mWebEngine.RegisterContextMenuHiddenCallback(callback);
+    mWebEngine.RegisterContextMenuHiddenCallback(std::move(callback));
   }
 }
 
@@ -831,7 +831,7 @@ void WebView::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceive
 {
   if(mWebEngine)
   {
-    mWebEngine.GetPlainTextAsynchronously(callback);
+    mWebEngine.GetPlainTextAsynchronously(std::move(callback));
   }
 }
 
index fd7c3e2..3f280d1 100644 (file)
@@ -339,16 +339,6 @@ void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task)
 {
   SvgVisualPtr self = this; // Keep reference until this API finished
 
-  // We don't need to keep tasks anymore. reset now.
-  if(task == mLoadingTask)
-  {
-    mLoadingTask.Reset();
-  }
-  if(task == mRasterizingTask)
-  {
-    mRasterizingTask.Reset();
-  }
-
   if(task->HasSucceeded())
   {
     PixelData rasterizedPixelData = task->GetPixelData();
@@ -357,6 +347,16 @@ void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task)
       task->GetRenderer().GetDefaultSize(mDefaultWidth, mDefaultHeight);
     }
 
+    // We don't need to keep tasks anymore. reset now.
+    if(task == mLoadingTask)
+    {
+      mLoadingTask.Reset();
+    }
+    if(task == mRasterizingTask)
+    {
+      mRasterizingTask.Reset();
+    }
+
     // Rasterization success
     if(rasterizedPixelData && IsOnScene())
     {
@@ -429,6 +429,19 @@ void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task)
   {
     mLoadFailed = true;
 
+    // Remove rasterizing task if we requested before.
+    if(mRasterizingTask)
+    {
+      Dali::AsyncTaskManager::Get().RemoveTask(mRasterizingTask);
+      mRasterizingTask.Reset();
+    }
+
+    // We don't need to keep tasks anymore. reset now.
+    if(task == mLoadingTask)
+    {
+      mLoadingTask.Reset();
+    }
+
     Actor actor = mPlacementActor.GetHandle();
     if(actor)
     {
index 3ec705e..0a4ac15 100644 (file)
@@ -29,7 +29,7 @@ namespace Toolkit
 {
 const unsigned int TOOLKIT_MAJOR_VERSION = 2;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 49;
+const unsigned int TOOLKIT_MICRO_VERSION = 50;
 const char* const  TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 9c8309c..3a44dc0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    2.2.49
+Version:    2.2.50
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT