[Tizen] Fix svg image not shown problem in store(APPS) 31/222231/1
authorDongsug Song <dongsug.song@samsung.com>
Sat, 11 Jan 2020 05:55:20 +0000 (14:55 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Sat, 11 Jan 2020 05:55:20 +0000 (14:55 +0900)
Change-Id: I3c2ff76c4cad2dd9fdc7ee3768771677621e59bc

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 );
   }
 }