#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
{
VisualFactoryCache::VisualFactoryCache( bool preMultiplyOnLoad )
: mSvgRasterizeThread( NULL ),
+ mVectorAnimationThread(),
mBrokenImageUrl(""),
mPreMultiplyOnLoad( preMultiplyOnLoad )
{
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() );
}
}