mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
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:
parent
2a56e25788
commit
507428b03e
11 changed files with 59 additions and 116 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue