Commit graph

7 commits

Author SHA1 Message Date
Simon Hausmann
5ff0278185 Simplify path event extraction
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.
2023-01-21 13:10:19 +01:00
Simon Hausmann
0d23478469 skia: Cache and re-use Skia path elements for Slint item paths
This follows Skia best practices to re-use the path, because internally each path has its own id
that is used by the backend to cache stuff.
2023-01-16 21:31:10 +01:00
Simon Hausmann
a4e4863669 Fix SkiaRenderer::new to take the window adapter weak by value
... for consistency with the software renderer API.
2022-12-12 12:01:12 +01:00
Simon Hausmann
7b4a3cd29a Improve the safety of the skia renderer API
Claim a strong reference (ownership or RC) on the value that provides the raw window handle.
2022-12-12 11:59:50 +01:00
Simon Hausmann
47cb989258 Add some barebones docs 2022-12-09 17:04:54 +01:00
Simon Hausmann
43498f05b9 Make Surface trait internal 2022-12-09 17:04:54 +01:00
Simon Hausmann
01d2efce4e Move the Skia renderer into a separate crate
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.
2022-12-09 17:04:54 +01:00