Simplify FemtoVG and Skia renderer API (#3153)

Fold show() into the first time render() is invoked,
and hide() into the Drop implementation.
This commit is contained in:
Simon Hausmann 2023-07-25 17:17:40 +02:00 committed by GitHub
parent 2a56e25788
commit 507428b03e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 59 additions and 116 deletions

View file

@ -451,18 +451,6 @@ pub mod skia {
drop(Box::from_raw(r as *mut SkiaRenderer))
}
#[no_mangle]
pub unsafe extern "C" fn slint_skia_renderer_show(r: SkiaRendererOpaque) {
let r = &*(r as *const SkiaRenderer);
r.show().unwrap()
}
#[no_mangle]
pub unsafe extern "C" fn slint_skia_renderer_hide(r: SkiaRendererOpaque) {
let r = &*(r as *const SkiaRenderer);
r.hide().unwrap()
}
#[no_mangle]
pub unsafe extern "C" fn slint_skia_renderer_resize(r: SkiaRendererOpaque, size: IntSize) {
let r = &*(r as *const SkiaRenderer);