Add support for frame throttling on Wayland

Use winit's pre_present_notify() API to allow for the compositor to throttle rendering.

Fixes #4200
cc #1695
This commit is contained in:
Simon Hausmann 2023-12-21 14:16:28 +01:00 committed by Simon Hausmann
parent 0c4177794e
commit 3069e8e503
14 changed files with 159 additions and 103 deletions

View file

@ -546,7 +546,7 @@ pub mod skia {
#[no_mangle]
pub unsafe extern "C" fn slint_skia_renderer_render(r: SkiaRendererOpaque) {
let r = &*(r as *const SkiaRenderer);
r.render().unwrap();
r.render(None).unwrap();
}
#[no_mangle]