Use a CStr instead of str, to avoid an extra CString allocation. The underlying operating system API for
this expects a zero terminated C String.
Fixes#1943
Return the path events for rendering as an Option, so that if the path is empty,
we simply return.
This avoids a double property dependency in the (likely) event the path is not empty.
Make with_graphics_api robus by ensuring that the context is always current (similar to commit a124f4b8fe)
and remove the with_current_context boilerplate.
Instead of the ClippedImage. Because we use the colorize property more
often than the source property, and these are soon going to be even more
expensive
Commit f66a2a5775 and dc048a11db introduced
the regression of issue #1985 where in adjust_rect_and_border_for_inner_drawing
instead of subtracting the entire border width from the size,
only half of it was subtracted,
leaving an inner area of the rectangle visible.
Fixes#1985
We need to check the original size of the canvas before winit override it
The previous code didn't work for two reason
- It was done after winit had reset the size of the canvas to the
default size
- It just calls set_inner_size on the winit Window, which is not what we want,
we want to call the api::Window::set_size funciton so it can keep all
different sizes in sync
The crate is an internal crate until the API has been polished and
documented, after which we can call slint-renderer-skia for example.
This also duplicates a little bit of the glutin setup code, because
that would otherwise have to go into another shared crate.
The default impl of unregister_component in WindowAdapterSealed would call free_graphics_resources
on the rendere. Any re-implementation would have to do the same,
which the winit backend forwarded through
the winit backend specific internal renderer interface.
Instead, the original call site for unregister_component now calls
free_graphics_resources and unregister_component (for accessibility tree dirty notification).
Replace register_root_component in the WindowAdapterSealed altogether with
a default font size getter on the renderer.
This is overall simpler and allows removing the doc-hidden getter in the software renderer.
When selecting the egl/glx config, select a configuration that has multisampling disabled,
as opposed to one that maximizes the number of samples per pixel.
This also fixes XIO errors causing the process to abort, when resizing very quickly.
Since commit ea4ad7297b, the metal and d3d
surfaces are built unconditionally when Skia is enabled, which means we
also need to have their dependencies enabled in the "other" skia
feature.
This reverts commit 000d95670b and commit
d764796e0c to fix arm cross build and
x86-64 linux.
Let's use the core::ffi types when fontconfig-sys switches to it.