- This allows creating the Skia GL interface without string allocations
- Port the item renderer to use SkImageFilters::Shader instead of
SkImageFilter::Paint
On macOS and Windows, use winit's `Window::theme()` instead of
dark-light, to detect the theme.
Always react to WindowEvent::ThemeChange. It's delivered on macOS,
Windows, and the web.
The CI build vsix panics on line 84 in glcontext.rs. There's no unwrap()
there but there's one nearby. I wasn't able to reproduce this with a
local build, so this is a prospective attempt, assuming that this is due
to the attempt of glx-over-egl display configuration finding.
As the surface creation may fail with Egl later, then display preference
EglThenGlx is not sufficient and we need to completely re-do the glutin
initialization and try with GLX.
cc #2162
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.
Commit 01d2efce4e ended up creating our
OpenGLSurface type with the GL context not current, and right after that
SkiaRenderer would invoke the RenderingSetup callback, which expects a
current context.
Solve this by simplifying the context handling in the OpenGLSurface in
the Skia renderer: The main purpose of glutin's NotCurrentContext
appears to be the ability to send it across threads, which we don't
need. Therefore always store a PossiblyCurrent and use the context's own
interior mutability to make it current if needed.
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
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.