tvg_saver: optimize tvg format.
authorHermet Park <chuneon.park@samsung.com>
Tue, 10 Aug 2021 08:43:28 +0000 (17:43 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 13 Aug 2021 05:21:50 +0000 (14:21 +0900)
commita983060924e82b27a1fbf6ec2afcc0c3669edea7
tree31d299c9606583dcf5ca25f5d8a41d5b113d0640
parentfbc55d8d6cf977735ae0209e484707a716239083
tvg_saver: optimize tvg format.

So this optimization stragtegy is to merging shapes.
If two shapes have the same layer, having save properties except the paths,
we can integrate two shapes to one, this helps to build up a simpler
scene-tree, reduce the runtime memory, helps for faster processing for rendering.

As far as I checked tiger.svg, it removes 142 shape nodes,
decreased the binary size: 60537 -> 54568.

Overall, avg 4% binary size can be reduced among our example svgs by this patch.
src/examples/images/test.tvg
src/savers/tvg/tvgTvgSaver.cpp