lottietoqml: Use defs nodes for precompositions


Using the QML Component/Loader mechanism, defs nodes allow a subtree
to be defined once, and then cheaply instantiated multiple times. This
is very well suited for Lottie precomps.

With this commit, we generate defs nodes for all defined
precompositions during the initial root node visit. Then when visiting
PrecompLayer nodes, we generate only an instantiation of the
referenced precomp node.

Extra care is taken to give the instantiated items access to the
bounds size of the instantiating precomp layer, since that may vary
for different instantiations, and must be correct for e.g. mask/matte
generation.

Fixes: QTBUG-135275
Change-Id: I2cbb4b5fcf1634cf348fbb4d5ccb445dce8c37b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
commit260fd772bb763e93c6564ee3cf16eb5ab5b3e52f
parentb28e2eafeac9d6358bed4a6c030390f48b73e58d
authorEirik Aavitsland <eirik.aavitsland@qt.io>
committerEirik Aavitsland <eirik.aavitsland@qt.io>
commit timeThu, 26 Mar 2026 09:20:38 +0100