Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ThorVG to v0.10.0 #80095

Merged
merged 1 commit into from
Aug 17, 2023
Merged

Conversation

capnm
Copy link
Contributor

@capnm capnm commented Jul 31, 2023

For more information please read the release notes: https://github.com/thorvg/thorvg/releases/tag/v0.10.0

  • API change ARGB8888_STRAIGHT -> ARGB8888S
  • SVG-SCsub: Enable static ThorVG object linking
  • SVG-SCsub: avoid building unused ThorVG parts
  • update-thorvg.sh: add v0.10.0 and copy only the Godot relevant code

SVG: stroke-miterlimit

grafik

@capnm capnm requested review from a team as code owners July 31, 2023 22:06
@fire
Copy link
Member

fire commented Jul 31, 2023

Not for this pr, but lottie support is in thorvg v0.10.0!

https://github.com/thorvg/thorvg/releases/tag/v0.10.0

For a future date, we can rasterize lottie like svg and to sprite animation for now.

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for extended testing.

Didn't see many changes in the svg adapters, the changes are mostly in the thorvg code.

image

The svg icons from Godot Engine load fine.

@capnm
Copy link
Contributor Author

capnm commented Aug 7, 2023

I have intentionally touched the old configuration minimally and haven't found any regression so far.

I want to modify the current installation (make it clearer) by copying only the parts that are currently used in Godot (+ corresponding modification of the scons files).

The next version will improve and change the file structures, and the required scons changes would then be more understandable and this also reduces the Godot binary size.

I would prefer make that in another PR. Or should I make the changes directly in this PR?

@YuriSizov
Copy link
Contributor

I want to modify the current installation (make it clearer) by copying only the parts that are currently used in Godot (+ corresponding modification of the scons files).

Would this reduce the number of files included? If so, this would definitely be worth doing now, because extra 24k LOC is problematic.

@coppolaemilio
Copy link
Member

Hey, thanks for the PR!
I'm wondering a few things. Would this update fix any issues reported already?
I feel like 26k lines might be a bit too much to merge if it is not addressing any issues we have with the current implementation.

@capnm
Copy link
Contributor Author

capnm commented Aug 8, 2023

I want to modify the current installation (make it clearer) by copying only the parts that are currently used in Godot (+ corresponding modification of the scons files).

Would this reduce the number of files included? If so, this would definitely be worth doing now, because extra 24k LOC is problematic.

Yes, I copied only the minimum what Godot needs. I had some time now :) to take a closer look at the Godot's svg scons files. IMO the original authors made a mistake to additionally enabling ThorVG parts that are completely useless in the current Godot implementation. After some internal tests, I will then update the PR to review the changes...

@capnm
Copy link
Contributor Author

capnm commented Aug 8, 2023

Hey, thanks for the PR! I'm wondering a few things. Would this update fix any issues reported already? I feel like 26k lines might be a bit too much to merge if it is not addressing any issues we have with the current implementation.

As I said ^above^, please read the comments for this release and see in the ThorVG issues. There are some additional svg feature or speed improvements. At least I hope @MewPurPur can now further increase his excellent icon creativity with my contribution:)

- Release Notes: https://github.com/thorvg/thorvg/releases/tag/v0.10.0
- API change ARGB8888_STRAIGHT -> ARGB8888S
- SVG-SCsub: Enable static ThorVG object linking
- SVG-SCsub: avoid building unused ThorVG parts
- update-thorvg.sh: add v0.10.0 and copy only the Godot relevant code
@capnm
Copy link
Contributor Author

capnm commented Aug 9, 2023

OK. I rebased the PR to the current Github tip, loaded about 2k SVG images, tested some SVG fonts and didn't found a regression to the timing based thread-deadlock issues that are already present in 4.2. But all our projects are running in the PR + 4.1 branch almost production ready:) I haven't discovered any new (linux OS) issue with this PR...

@hermet
Copy link

hermet commented Aug 11, 2023

I'm looking forward to Godot supporting Lottie animations on the user side. If you need any assistance with playing Lottie animations in Godot, please don't hesitate to reach out. Thank you! :-)

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@akien-mga akien-mga merged commit 08690d6 into godotengine:master Aug 17, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

akien-mga commented Aug 17, 2023

I'm seeing these linker warnings on Windows with MSVC:

LINK : warning LNK4217: symbol '?transform@Paint@tvg@@QEAA?AW4Result@2@AEBUMatri
x@2@@Z (public: enum tvg::Result __cdecl tvg::Paint::transform(struct tvg::Matri
x const &))' defined in 'module_svg.windows.editor.dev.x86_64.lib(tvgPaint.windo
ws.editor.dev.x86_64.obj)' is imported by 'module_text_server_adv.windows.editor
.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.obj)' in function '"u
nsigned int __cdecl fastmod(unsigned int,unsigned __int64,unsigned int)" (?fastm
od@@YAII_KI@Z)'
LINK : warning LNK4217: symbol '?bounds@Paint@tvg@@QEBA?AW4Result@2@PEAM000_N@Z
(public: enum tvg::Result __cdecl tvg::Paint::bounds(float *,float *,float *,flo
at *,bool)const )' defined in 'module_svg.windows.editor.dev.x86_64.lib(tvgPaint
.windows.editor.dev.x86_64.obj)' is imported by 'module_text_server_adv.windows.
editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.obj)' in functi
on '"unsigned int __cdecl fastmod(unsigned int,unsigned __int64,unsigned int)" (
?fastmod@@YAII_KI@Z)'
LINK : warning LNK4286: symbol '?bounds@Paint@tvg@@QEBA?AW4Result@2@PEAM000_N@Z
(public: enum tvg::Result __cdecl tvg::Paint::bounds(float *,float *,float *,flo
at *,bool)const )' defined in 'module_svg.windows.editor.dev.x86_64.lib(tvgPaint
.windows.editor.dev.x86_64.obj)' is imported by 'module_text_server_adv.windows.
editor.dev.x86_64.lib(thorvg_bounds_iterator.windows.editor.dev.x86_64.obj)'
LINK : warning LNK4217: symbol '?push@Canvas@tvg@@UEAA?AW4Result@2@V?$unique_ptr
@VPaint@tvg@@U?$default_delete@VPaint@tvg@@@std@@@std@@@Z (public: virtual enum
tvg::Result __cdecl tvg::Canvas::push(class std::unique_ptr<class tvg::Paint,str
uct std::default_delete<class tvg::Paint> >))' defined in 'module_svg.windows.ed
itor.dev.x86_64.lib(tvgCanvas.windows.editor.dev.x86_64.obj)' is imported by 'mo
dule_text_server_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.edit
or.dev.x86_64.obj)' in function '"unsigned int __cdecl fastmod(unsigned int,unsi
gned __int64,unsigned int)" (?fastmod@@YAII_KI@Z)'
LINK : warning LNK4217: symbol '?draw@Canvas@tvg@@UEAA?AW4Result@2@XZ (public: v
irtual enum tvg::Result __cdecl tvg::Canvas::draw(void))' defined in 'module_svg
.windows.editor.dev.x86_64.lib(tvgCanvas.windows.editor.dev.x86_64.obj)' is impo
rted by 'module_text_server_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.w
indows.editor.dev.x86_64.obj)' in function '"unsigned int __cdecl fastmod(unsign
ed int,unsigned __int64,unsigned int)" (?fastmod@@YAII_KI@Z)'
LINK : warning LNK4217: symbol '?sync@Canvas@tvg@@UEAA?AW4Result@2@XZ (public: v
irtual enum tvg::Result __cdecl tvg::Canvas::sync(void))' defined in 'module_svg
.windows.editor.dev.x86_64.lib(tvgCanvas.windows.editor.dev.x86_64.obj)' is impo
rted by 'module_text_server_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.w
indows.editor.dev.x86_64.obj)' in function '"unsigned int __cdecl fastmod(unsign
ed int,unsigned __int64,unsigned int)" (?fastmod@@YAII_KI@Z)'
LINK : warning LNK4217: symbol '??1Picture@tvg@@UEAA@XZ (public: virtual __cdecl
 tvg::Picture::~Picture(void))' defined in 'module_svg.windows.editor.dev.x86_64
.lib(tvgPicture.windows.editor.dev.x86_64.obj)' is imported by 'module_text_serv
er_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.
obj)' in function '"public: virtual void * __cdecl tvg::Picture::`scalar deletin
g destructor'(unsigned int)" (??_GPicture@tvg@@UEAAPEAXI@Z)'
LINK : warning LNK4217: symbol '?load@Picture@tvg@@QEAA?AW4Result@2@PEBDIAEBV?$b
asic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z (public: enum tvg
::Result __cdecl tvg::Picture::load(char const *,unsigned int,class std::basic_s
tring<char,struct std::char_traits<char>,class std::allocator<char> > const &,bo
ol))' defined in 'module_svg.windows.editor.dev.x86_64.lib(tvgPicture.windows.ed
itor.dev.x86_64.obj)' is imported by 'module_text_server_adv.windows.editor.dev.
x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.obj)' in function '"unsign
ed int __cdecl fastmod(unsigned int,unsigned __int64,unsigned int)" (?fastmod@@Y
AII_KI@Z)'
LINK : warning LNK4217: symbol '?gen@Picture@tvg@@SA?AV?$unique_ptr@VPicture@tvg
@@U?$default_delete@VPicture@tvg@@@std@@@std@@XZ (public: static class std::uniq
ue_ptr<class tvg::Picture,struct std::default_delete<class tvg::Picture> > __cde
cl tvg::Picture::gen(void))' defined in 'module_svg.windows.editor.dev.x86_64.li
b(tvgPicture.windows.editor.dev.x86_64.obj)' is imported by 'module_text_server_
adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.obj
)' in function '"unsigned int __cdecl fastmod(unsigned int,unsigned __int64,unsi
gned int)" (?fastmod@@YAII_KI@Z)'
LINK : warning LNK4217: symbol '??1SwCanvas@tvg@@UEAA@XZ (public: virtual __cdec
l tvg::SwCanvas::~SwCanvas(void))' defined in 'module_svg.windows.editor.dev.x86
_64.lib(tvgSwCanvas.windows.editor.dev.x86_64.obj)' is imported by 'module_text_
server_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86
_64.obj)' in function '"public: virtual void * __cdecl tvg::SwCanvas::`scalar de
leting destructor'(unsigned int)" (??_GSwCanvas@tvg@@UEAAPEAXI@Z)'
LINK : warning LNK4217: symbol '?target@SwCanvas@tvg@@QEAA?AW4Result@2@PEAIIIIW4
Colorspace@12@@Z (public: enum tvg::Result __cdecl tvg::SwCanvas::target(unsigne
d int *,unsigned int,unsigned int,unsigned int,enum tvg::SwCanvas::Colorspace))'
 defined in 'module_svg.windows.editor.dev.x86_64.lib(tvgSwCanvas.windows.editor
.dev.x86_64.obj)' is imported by 'module_text_server_adv.windows.editor.dev.x86_
64.lib(thorvg_svg_in_ot.windows.editor.dev.x86_64.obj)' in function '"unsigned i
nt __cdecl fastmod(unsigned int,unsigned __int64,unsigned int)" (?fastmod@@YAII_
KI@Z)'
LINK : warning LNK4217: symbol '?gen@SwCanvas@tvg@@SA?AV?$unique_ptr@VSwCanvas@t
vg@@U?$default_delete@VSwCanvas@tvg@@@std@@@std@@XZ (public: static class std::u
nique_ptr<class tvg::SwCanvas,struct std::default_delete<class tvg::SwCanvas> >
__cdecl tvg::SwCanvas::gen(void))' defined in 'module_svg.windows.editor.dev.x86
_64.lib(tvgSwCanvas.windows.editor.dev.x86_64.obj)' is imported by 'module_text_
server_adv.windows.editor.dev.x86_64.lib(thorvg_svg_in_ot.windows.editor.dev.x86
_64.obj)' in function '"unsigned int __cdecl fastmod(unsigned int,unsigned __int
64,unsigned int)" (?fastmod@@YAII_KI@Z)'

Compiling with scons p=windows dev_build=yes dev_mode=yes scu_build=yes.

CC @bruvzg as it involves svg_in_ot.

Edit: Fixed in #80713.

akien-mga added a commit to akien-mga/godot that referenced this pull request Aug 17, 2023
akien-mga added a commit that referenced this pull request Aug 17, 2023
…t-servers

SCons: Fix ThorVG build option in TextServers with #80095
@capnm capnm deleted the update_thorvg_0.10.0 branch September 18, 2023 13:56
mandryskowski pushed a commit to mandryskowski/godot that referenced this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants