(Vector) Call Finalize method instead of deleting VectorRenderer 10/218510/3
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 25 Nov 2019 04:42:42 +0000 (13:42 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 25 Nov 2019 04:53:12 +0000 (13:53 +0900)
Change-Id: Id7d0a5cab4229e6619122c6294914d512bae9b17

automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.cpp

index f8c0c365d47c407569e6da8301902a3bb4b0a2a9..b039c5780751c7302c31df142449e9877fff7edb 100755 (executable)
@@ -108,10 +108,6 @@ public:
     height = 100;
   }
 
-  void GetLayerInfo( Property::Map& map ) const
-  {
-  }
-
   Dali::VectorAnimationRenderer::UploadCompletedSignalType& UploadCompletedSignal()
   {
     return mUploadCompletedSignal;
@@ -186,6 +182,10 @@ VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimati
   return *this;
 }
 
+void VectorAnimationRenderer::Finalize()
+{
+}
+
 void VectorAnimationRenderer::SetRenderer( Renderer renderer )
 {
   Internal::Adaptor::GetImplementation( *this ).SetRenderer( renderer );
@@ -218,7 +218,6 @@ void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height
 
 void VectorAnimationRenderer::GetLayerInfo( Property::Map& map ) const
 {
-  Internal::Adaptor::GetImplementation( *this ).GetLayerInfo( map );
 }
 
 VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
index ac898677b1100e14f550f0d2cfedd278e7fe4e13..8258fb7e5ffb42025b45c8c2b5b703f4ca411767 100644 (file)
@@ -100,7 +100,7 @@ void VectorAnimationTask::Finalize()
     mAnimationFinishedTrigger.reset();
   }
 
-  mVectorRenderer.Reset();
+  mVectorRenderer.Finalize();
 }
 
 void VectorAnimationTask::SetRenderer( Renderer renderer )
index cb2d08a33f8337983fdaeffbdfefb675f0e5cb53..08cad3187c56fdc9f90895a07b61e42111e51236 100644 (file)
@@ -76,15 +76,15 @@ void VectorRasterizeThread::SetCompletedCallback( CallbackBase* callback )
 
 void VectorRasterizeThread::AddTask( VectorAnimationTaskPtr task )
 {
+  // Lock while adding task to the queue
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+
   if( !mIsThreadStarted )
   {
     Start();
     mIsThreadStarted = true;
   }
 
-  // Lock while adding task to the queue
-  ConditionalWait::ScopedLock lock( mConditionalWait );
-
   if( mRasterizeTasks.end() == std::find( mRasterizeTasks.begin(), mRasterizeTasks.end(), task ) )
   {
     mRasterizeTasks.push_back( task );