slint-ui / slint

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

live-preview: tearing/flickering #6249

Open SK83RJOSH opened 2 days ago

SK83RJOSH commented 2 days ago

I gave Slint Live-Preview a go today, and really love it so far! Unforunately though, it seems to exhibit extreme tearing and flickering when redrawing. This is only visible on display, and not in screen captures, so excuse the screen recording:

https://github.com/user-attachments/assets/14410197-bb2c-4119-b727-0594feef9dfb

I'm on Windows 10 Pro, and this occurs on both stable and nightly, I've attached a dxdiag below in case you're wondering about hardware/drivers. 🙂

DxDiag.txt

Do let me know if you need any additional info/want to send tests my way.

ogoffart commented 1 day ago

The live-preview is itself a Slint application. Do you observe the same effect with the actual Slint application? Can you try your application with the different Slint renderer (eg, skia-*, femtovg)? This looks like some issue somewhere in the rendering pipeline. Perhaps in the OpenGL driver.

SK83RJOSH commented 23 hours ago

Unfortunately our slint application is actually a game overlay, with custom logic for copying surfaces to our target application. So it's a bit hard for me to test without creating a new application for testing, as we're limited to off-screen rendering + femtovg.

I'll try to take some time tomorrow to do that, and see if I can find what the lowest common denominator is. 🙂

SK83RJOSH commented 12 hours ago

I decided to test this out using the examples, and can confirm that it does seem to occur in the following:

Which I think should cover both skia and femtovg?