[Tizen] Fix svg image not shown problem in store(APPS)
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / svg / svg-rasterize-thread.cpp
index c2c907f..174183e 100644 (file)
@@ -62,7 +62,14 @@ void RasterizingTask::Load()
   {
     Dali::Vector<uint8_t> remoteBuffer;
 
-    mParsedSvg = nsvgParseFromFile( mUrl.GetUrl().c_str(), UNITS, mDpi );
+    if( !Dali::FileLoader::DownloadFileSynchronously( mUrl.GetUrl(), remoteBuffer ))
+    {
+      DALI_LOG_ERROR("Failed to download file!\n");
+      return;
+    }
+
+    remoteBuffer.PushBack( '\0' );
+    mParsedSvg = nsvgParse( reinterpret_cast<char*>(remoteBuffer.begin()), UNITS, mDpi );
   }
 }