wasm: work with log option
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 15 Dec 2020 07:21:18 +0000 (16:21 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 16 Dec 2020 01:01:26 +0000 (10:01 +0900)
The wasm is using the ThorVG output starting whith "SVG:" to show
unsupported element and attribute of svg file.
This patch updates wasm_build.sh to make ThorVG prints log,
and removes build errors.

  - Following commit needs to include 'algorithm'
    1ed6113 common sw_engine: code refactoring & stabilizing.

  - Following commit needs to include 'string'
    5481633 svg_loader XmlParser: Print unsupported elements, ...

Change-Id: I46bee4588d84b2a647455ac831644f88d2e358cb

src/lib/sw_engine/tvgSwImage.cpp
src/loaders/svg/tvgXmlParser.cpp
wasm_build.sh

index 2968cb164a453f82d38a9c4af085d8ab53ad683a..342a28a5fdce09c0c8bea85aad309681b68a13f3 100644 (file)
@@ -19,7 +19,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include <math.h>
+#include <algorithm>
 #include "tvgSwCommon.h"
 
 /************************************************************************/
@@ -172,4 +172,4 @@ bool imageGenOutline(SwImage* image, const Picture* pdata, unsigned tid, const M
 void imageFree(SwImage* image)
 {
     rleFree(image->rle);
-}
\ No newline at end of file
+}
index 9c384974d407bbf616225ef3bf82949b739e29db..1da937e6a5bc2d8474118258adc456bf44413764 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include <ctype.h>
-#include <cstring>
+#include <string>
 #ifdef _WIN32
     #include <malloc.h>
 #else
index ae819605dbedc7c307ead5a30a35ef9bf611815a..ccd659e4e667f902da8ae4a2719b149d8f6ec38b 100755 (executable)
@@ -8,7 +8,7 @@ fi
 
 if [ ! -d "./builddir_wasm" ]; then
     sed "s|EMSDK:|$1|g" wasm_cross.txt > /tmp/.wasm_cross.txt
-    meson -Dbindings=[''] -Db_lto=true -Ddefault_library=static --cross-file /tmp/.wasm_cross.txt builddir_wasm 
+    meson -Dbindings=[''] -Db_lto=true -Ddefault_library=static -Dlog=true --cross-file /tmp/.wasm_cross.txt builddir_wasm
     cp ./test/wasm_test.html builddir_wasm/src/index.html
 fi