-void RasterizingTask::Load()
-{
- if( mParsedSvg != NULL)
- {
- return;
- }
-
- if( mUrl.IsLocalResource() )
- {
- Dali::Vector<char> buffer;
- if ( !Dali::FileLoader::ReadFile( mUrl.GetUrl(), buffer ) )
- {
- DALI_LOG_ERROR("Failed to read file!\n");
- return;
- }
-
- mParsedSvg = nsvgParse( buffer.begin(), UNITS, mDpi );
- }
- else
- {
- Dali::Vector<uint8_t> remoteBuffer;
-
- if( !Dali::FileLoader::DownloadFileSynchronously( mUrl.GetUrl(), remoteBuffer ))
- {
- DALI_LOG_ERROR("Failed to download file!\n");
- return;
- }
-
- mParsedSvg = nsvgParse( reinterpret_cast<char*>(remoteBuffer.begin()), UNITS, mDpi );
- }
-}
-