slint/sixtyfps_compiler/passes
Simon Hausmann fa95064363 Fix resource embedding across component boundaries
When referencing an image a repeated element and were targeting a
configuration that requires resource embedding, then that image would
not embedded.

This was due to the fact that we didn't recurse into sub-components in
the resource collection phase and the generators made a per-component
embedding decision. The field responsible for that was also not
propagated to sub-components.

This patch addresses these two bugs by cleaning up the entire mechanism:

The compiler first generates the new ResourceReference::AbsolutePath for
all img!"foo.png" expressions. If the compiler is configured to embed
resources, then the embed_resources pass will traverse all
sub-components and expressions in them to change them to
ResourceReference::EmbeddedData with a unique integer id. Simultaenously
all the resources to be embedded get also collected in the root
component, so that the build script as well as the generator can take
care of dependency handling and actual resource embedding.
2020-11-23 13:47:16 +01:00
..
check_expressions.rs Implement cubic-bezier 2020-11-13 13:36:32 +01:00
collect_globals.rs Apply default layout spacing and padding from the style 2020-11-04 15:20:43 +01:00
collect_structs.rs Also make sure to generate struct when the property is an array of struct 2020-11-17 12:33:19 +01:00
compile_paths.rs Move Type and related concepts in a different module 2020-10-23 11:17:14 +02:00
deduplicate_property_read.rs Move Type and related concepts in a different module 2020-10-23 11:17:14 +02:00
embed_resources.rs Fix resource embedding across component boundaries 2020-11-23 13:47:16 +01:00
focus_item.rs Add support for the initial_focus synthetic property 2020-09-30 15:11:01 +02:00
inlining.rs Fix states in the root of other components 2020-11-20 17:14:04 +01:00
lower_layout.rs Allow to export structs 2020-11-17 12:22:10 +01:00
lower_states.rs Work on transition: lower the transitions 2020-11-20 09:39:06 +01:00
materialize_fake_properties.rs Move Type and related concepts in a different module 2020-10-23 11:17:14 +02:00
move_declarations.rs Access global properties from rust 2020-10-29 11:01:04 +01:00
remove_aliases.rs Refactor the Layout generation code 2020-10-26 10:07:31 +01:00
repeater_component.rs Rework and simplify the focus handling 2020-11-20 15:33:15 +01:00
resolve_native_classes.rs Move Type and related concepts in a different module 2020-10-23 11:17:14 +02:00
resolving.rs Fix resource embedding across component boundaries 2020-11-23 13:47:16 +01:00
unique_id.rs Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00