Refactor precomposition parsing & handling


Precompositions are json subtrees defined in the root object's assets
field. They can be instantiated by one or more PrecompLayer elements.

They used to be handled by giving each PrecompLayer a copy of the
original assets, and each would parse the json subtree and create the
corresponding QLottie element subtree as a child. This was somewhat
wasteful, since the same json code would potentially decoded many
times.

This commit instead parses the assets once during the root element
creation, and stores the created QLottie element subtrees in a
separate lookup table. During normal parsing, the PrecompLayers now
only parse the precomp reference string. After the entire json has
been parsed, the resulting object tree is traversed, and every
PrecompLayer object is simply assigned a clone of the referred
precomposition object subtree.

Change-Id: I24dda1f523928bdd86358a0317667cc5d8fe5d87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
commitb28e2eafeac9d6358bed4a6c030390f48b73e58d
parent64c119db5daf5c7ce73a9bd8ea5579a036fdf264
authorEirik Aavitsland <eirik.aavitsland@qt.io>
committerEirik Aavitsland <eirik.aavitsland@qt.io>
commit timeWed, 25 Mar 2026 12:09:28 +0100