Merge "MS Windows - Fix compile error when debug is enabled." into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 21 Jan 2020 14:17:57 +0000 (14:17 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 21 Jan 2020 14:17:57 +0000 (14:17 +0000)
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
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/image/image-visual.cpp
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/texture-manager-impl.h

index 1fe89ea..069a644 100644 (file)
@@ -413,7 +413,7 @@ int UtcDaliAnimatedVectorImageVisualPlayback(void)
 
     map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
     value = map.Find( DevelImageVisual::Property::PLAY_STATE );
-    DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::PAUSED );
+    DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
 
     tet_infoline( "On stage again" );
     Stage::GetCurrent().Add( dummyControl );
@@ -423,7 +423,7 @@ int UtcDaliAnimatedVectorImageVisualPlayback(void)
 
     map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
     value = map.Find( DevelImageVisual::Property::PLAY_STATE );
-    DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::PAUSED );
+    DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::STOPPED );
 
     tet_infoline( "Test Play action" );
     DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
index d4de346..2ed0502 100644 (file)
@@ -307,7 +307,7 @@ void AnimatedVectorImageVisual::DoSetOnStage( Actor& actor )
 
 void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
 {
-  PauseAnimation();
+  StopAnimation();
 
   if( mImpl->mRenderer )
   {
@@ -535,13 +535,13 @@ void AnimatedVectorImageVisual::SetVectorImageSize()
   }
 }
 
-void AnimatedVectorImageVisual::PauseAnimation()
+void AnimatedVectorImageVisual::StopAnimation()
 {
-  if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+  if( mActionStatus != DevelAnimatedVectorImageVisual::Action::STOP )
   {
-    mVectorAnimationTask->PauseAnimation();
+    mVectorAnimationTask->StopAnimation();
 
-    mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+    mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
 
     if( mImpl->mRenderer )
     {
@@ -584,7 +584,7 @@ void AnimatedVectorImageVisual::OnControlVisibilityChanged( Actor actor, bool vi
 {
   if( !visible )
   {
-    PauseAnimation();
+    StopAnimation();
 
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this );
   }
@@ -594,7 +594,7 @@ void AnimatedVectorImageVisual::OnWindowVisibilityChanged( Window window, bool v
 {
   if( !visible )
   {
-    PauseAnimation();
+    StopAnimation();
 
     DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this );
   }
index 0ff2cdd..8aaed9c 100644 (file)
@@ -168,9 +168,9 @@ private:
   void SetVectorImageSize();
 
   /**
-   * @brief Pause the animation.
+   * @brief Stop the animation.
    */
-  void PauseAnimation();
+  void StopAnimation();
 
   /**
    * @brief Callback when the world scale factor changes.
index 7ecfb81..f656e2d 100644 (file)
@@ -425,7 +425,6 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
       if( value.Get( alphaUrl ) )
       {
         AllocateMaskData();
-        // Immediately trigger the alpha mask loading (it may just get a cached value)
         mMaskingData->mAlphaMaskUrl = alphaUrl;
       }
       break;
index fbb8114..a2381e8 100644 (file)
@@ -146,7 +146,7 @@ TextureManager::~TextureManager()
 
 TextureSet TextureManager::LoadTexture(
   const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode,
-  Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo,
+  Dali::SamplingMode::Type samplingMode, MaskingDataPointer& maskInfo,
   bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect,
   Dali::ImageDimensions& textureRectSize, bool& atlasingStatus, bool& loadingStatus,
   Dali::WrapMode::Type wrapModeU, Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver,
@@ -252,9 +252,9 @@ TextureSet TextureManager::LoadTexture(
       }
       else
       {
-        TextureId alphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
+        maskInfo->mAlphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
         textureId = RequestLoad( url,
-                                 alphaMaskId,
+                                 maskInfo->mAlphaMaskId,
                                  maskInfo->mContentScaleFactor,
                                  desiredSize,
                                  fittingMode, samplingMode,
index b782517..651bc44 100755 (executable)
@@ -174,7 +174,7 @@ public:
    * @param[in] desiredSize           The size the image is likely to appear at. This can be set to 0,0 for automatic
    * @param[in] fittingMode           The FittingMode to use
    * @param[in] samplingMode          The SamplingMode to use
-   * @param[in] maskInfo              Mask info structure
+   * @param[in, out] maskInfo         Mask info structure
    * @param[in] synchronousLoading    true if the URL should be loaded synchronously
    * @param[out] textureId,           The textureId of the URL
    * @param[out] textureRect          The rectangle within the texture atlas that this URL occupies,
@@ -204,7 +204,7 @@ public:
                           Dali::ImageDimensions        desiredSize,
                           Dali::FittingMode::Type      fittingMode,
                           Dali::SamplingMode::Type     samplingMode,
-                          const MaskingDataPointer&    maskInfo,
+                          MaskingDataPointer&          maskInfo,
                           bool                         synchronousLoading,
                           TextureManager::TextureId&   textureId,
                           Vector4&                     textureRect,