And do some passes before inlining
We will need the list of components before inlining in order to generate
them if we disable inlining
So we can do some passes on each component before they are inlining
I tried to put the flickable pass in that list, but it did not work
if the Flickable itself is the root of a component
The interpreter created an intermediate window for the component but
the regular parent window is used for rendering. This resulted in the situation
where the layout computation was done before rendering with the intermediate window,
the text layout was calculated and cached in the Text's cached rendering data.
That in turn is just an index into the window's rendering cache (arena),
which is also later used for rendering. The index is local to the window, so
during layout the index was assigned for the intermediate window and
when rendering it seemed valid and happened to also refer to a Text item in the
cache of the real window, but with the wrong size/data.
Fixes#278
Binding expressions may end up calling sixtyfps::Image:size(), which
requires a graphics backend to be set.
The wasm interpreter code path circumvents the
sixtyfps_corelib::backend::instance_or_init call and went straight to
the GL backend, so we need an extra call to ensure its creation.
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
Commit 162944b8c9 changed `set_component` to
clear the weak focus item ref (correct), which made the test failure. That's because
the interpreter called set_component after running the setup code (wrong).
Return an iterator when querying the properties. This requires a
one-time copy of the property declarations out of the compiler data
structure, which is read-only.
This is just a starting point, to be turned into a real Transform
element later, along with syntactic sugar to turn rotation, etc. into a
transform matrix in the generated output.
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.