Borrow the rendering and cache individually with different mutability.
We might later, for destruction handling, need to borrow the rendering
cache mutably. That in turn *may* happen even during rendering itself,
as the models are updated lazily during visitor traversal and that may
result in item destruction.
Move fields out of the HighLevelRenderingPrimitive that are suitable to
represent as uniform variables. That reduces fields like Image or
Rectangle to their image or dimension, and only if *they* change, then
we re-do the work of building geometry and uploading it to the GPU.
Instead, the typically animated properties such as the position or the
color are passed separately with each draw call. This avoids re-decoding
PNG files and uploading them again when moving an image element around
on the screen.
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.
But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
Remove the Optional from the evaluation context passing for property
evaluation. Unfortunately there are nullptr uses left on the C++ side,
that need to be replaced with passing through.
This introduces a separate rendering preparation step in the main
window. As a consequence, the component becomes a parameter and the
graphicstest example can't use the main window anymore.
The decision whether a new low-level primitive needs to be created or
not is made by comparing the last RenderingPrimitive against the new
one.
On the upside, this means that property changes are now reflected in the
graphics.
Forward the text and color properties to the rendering backend, where
right now we just rendering all the glyphs into a dedicated texture.
Next steps are a glyph atlas texture, blending the specified color with
the alpha of the glyphs, configurable size and family, shaping with
Harfbuzz and may more things.