Just like the software renderer, query the background color when rendering
and use it as clear color.
In the simulator this was an unused field (because the sw renderer already does the right thing).
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.
Every backend will do something different with the string that needs to go into the clipboard.
Qt will convert it to a QString, copypasta to a String, in theory it could be written
directly to a socket.
Given that we don't know what the perfect representation on the backend side is, passing
a string slice avoids any immediate conversions.
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.
I want to track component structure changes in the window without
generating more code. So use a more generic name for the init_*_items
functions, so that I can add the functionality I need in there.
Also add a register_component to PlatformWindow and call that.
I want a more generic name as I want to do to track component structure
changes in addition to resource freeing and I do not want to add another
call into the generated code.
The display-interface-spi crate the not flush the internal fifo between the write
and the changes of the CS and DC pins, which result of changing these pins before
the screen recieve all the data over the spi and causes artifacts on the screen.
So re-implement the logic in our crate and use `transfer` instead of `write`
which flushes the fifo correctly.
This requires us to flash the cache before swapping the frame buffer pointer.
With slide puzzle span drawing with image tiles goes from ~100ms down to ~50ms,
and theme switching between simple and berlin from ~140ms to ~72ms.
This is with the line renderer.
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().
The mcu simulator builds i-slint-core with the std feature, but debug_log maybe
used in #[no_std] contexts, so we need to use a re-export rather than rely on std
being present
The slide puzzle makes use of the source-clip-* properties and that unveiled three issues:
* For the scale factor from image space to physical pixel space (sx/sy),
use the source clip size, as we're only drawing those
pixels. That means that the call sites of draw_image_impl need to pass the
correct original image size if there is no source clip.
* Similarly, the scaled_clip is in image coordinates, but needs to be relative to the source-clip-x/y
* The geometry for the target rectangle on screen
must originate at (0, 0) so that the apllication of
sx/sy only changes the size.