Commit graph

9 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
Olivier Goffart
d6b66a0690 Skia/femtfovg rectangle with transluscent border: set minimum radius
Set the minimum radius of the background to limit the artifact when
drawing the border
2023-01-20 14:12:43 +01:00
Simon Hausmann
b2c0392d7d
Fix Skia's drawing of the border rectangle with non-opaque borders (#2079) (#2086)
Also fix the border radius to be the outer radius of the rectangle

Skia renderer part of #1988 (minus clipping)
2023-01-20 11:33:55 +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
5ebab4b354 skia: Fix wrong path offset
Convert from logical to physical pixels for the offset.
2023-01-16 21:31:10 +01:00
Simon Hausmann
0d37565cc2 janitor: bump Rust Skia bindings to the latest release
This includes additional cross-compilation build fixes that will allow
removing patches from the Yocto recipes.
2023-01-16 10:12:52 +01:00
Olivier Goffart
5cd38adb14 Move the colorize property to the Image item
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
2022-12-20 08:42:47 -08:00
Simon Hausmann
aea216fb49 Fix rendering of border widths with FemtoVG and Skia
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
2022-12-14 15:32:53 +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
Renamed from internal/backends/winit/renderer/skia/itemrenderer.rs (Browse further)