CMake - Option added to define the default toolkit resource path.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-factory-cache.cpp
index 101e696..854a43a 100644 (file)
 #include <dali-toolkit/internal/visuals/svg/svg-visual.h>
 #include <dali-toolkit/internal/visuals/image-atlas-manager.h>
 
-
-namespace
-{
-const char * const BROKEN_VISUAL_IMAGE_URL( DALI_IMAGE_DIR "broken.png");
-}
-
 namespace Dali
 {
 
@@ -43,6 +37,7 @@ namespace Internal
 
 VisualFactoryCache::VisualFactoryCache( bool preMultiplyOnLoad )
 : mSvgRasterizeThread( NULL ),
+  mVectorAnimationThread(),
   mBrokenImageUrl(""),
   mPreMultiplyOnLoad( preMultiplyOnLoad )
 {
@@ -135,11 +130,21 @@ SvgRasterizeThread* VisualFactoryCache::GetSVGRasterizationThread()
   return mSvgRasterizeThread;
 }
 
+VectorAnimationThread& VisualFactoryCache::GetVectorAnimationThread()
+{
+  if( !mVectorAnimationThread )
+  {
+    mVectorAnimationThread = std::unique_ptr< VectorAnimationThread >( new VectorAnimationThread() );
+    mVectorAnimationThread->Start();
+  }
+  return *mVectorAnimationThread;
+}
+
 void VisualFactoryCache::ApplyRasterizedSVGToSampler()
 {
   while( RasterizingTaskPtr task = mSvgRasterizeThread->NextCompletedTask() )
   {
-    task->GetSvgVisual()->ApplyRasterizedImage( task->GetPixelData() );
+    task->GetSvgVisual()->ApplyRasterizedImage( task->GetParsedImage(), task->GetPixelData() );
   }
 }