slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.55k stars 601 forks source link

Path dose not work well on renderer-skia-opengl #5978

Open Horbin-Magician opened 2 months ago

Horbin-Magician commented 2 months ago

Win11, Slint1.7.2, renderer-skia-opengl, Rust

The Path is not displayed or is abnormal when using renderer-skia-opengl.

renderer-skia-opengl (abnormal):

https://github.com/user-attachments/assets/dfc7f71d-868d-459b-a441-be33e1d851ab

renderer-femtovg (normal):

https://github.com/user-attachments/assets/f6c9ce47-fbde-4e91-8468-6ca6575e4e10

I guess that only Path over a certain height and width will be displayed properly.

This is my demo code: path_demo.zip

tronical commented 1 month ago

Hmm, this is odd. I tried reproducing this on macOS and Linux, but your example just works out of the box. (I can't try windows right now because of issues compiling skia on windows for arm). I somehow doubt that it's specific to Windows though.

Do you see any difference with the Skia software renderer, btw?

Horbin-Magician commented 1 month ago

Do you see any difference with the Skia software renderer, btw?

I don't know how to use the Skia software renderer, the way is in document?

tronical commented 1 month ago

Try set SLINT_BACKEND=winit-skia-software :)

Horbin-Magician commented 1 month ago

Try set SLINT_BACKEND=winit-skia-software :)

The winit-skia-software works well.