When the renderer does not re-implement visit_clip, we call combine_clip.
Then we're missing out on an optimization the GL renderer does: When the resulting clip region
is empty, we do not need to recurse into children for rendering.
That itself reduces the property dependency chain and avoids unnecessary
updates when invisible (clipped) children change properties.
If we want to use the software renderer as a drop in replacement
for the GL renderer, we need to be able to render all images
without the compiler having to pre-render the textures
This was tested by hacking the compiler not to render the texture
with the mcu simulator
This simplifies the renderer handling - the FontRequest arriving there
will always be resolved.
And this reduces the amount of property dependencies: If a Text elements
specifies a font-family, no dependency to the window's
default-font-family is created.
This includes the cache of decoded images, the HTMLImage element support
and the SVG rendering adapter.
The objective is that Image holds an ImageInner, which is not a path
anymore that the backend has to process, but instead always either
decoded image data, a pointer to a static texture or an SVG tree that
can be rendered to the desired size.
The as_any() method returning a `&mut dyn Any` meant that the type has to be
'static. The class solution of returning &()
doesn't work because it has to be a mutable ref. Therefore just return an Option.
This ensures that the partial renderer updates correctly and this also
fixes a panic in the printer demo on the stm32h7 when opening the format
combobox in the scan page:
We would attempt to render the word "JPEG" with a font size of 12 pixels.
The letter J has a height of 12 pixels, like the font ascender reported, but it's
y coordinate is negative.
That would also result in a negative text item relative origin for the glyph (target
rect in physical pixels),
which fails to convert to an usize and panics.
When using repeaters - like in the slide puzzle - and during renderer a component
gets deleted, we call free_graphics_resources and try to free
the dirty rectangle list in the partial renderer cache. At that point the cache is
already mutably borrowed, which causes a panic.
As remedy, apply the mutable borrow more fine grained and not right when calling
render().